<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Core &mdash; Maximilian  documentation</title>
      <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
      <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  <!--[if lt IE 9]>
    <script src="_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
        <script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
        <script src="_static/jquery.js"></script>
        <script src="_static/underscore.js"></script>
        <script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
        <script src="_static/doctools.js"></script>
        <script src="_static/sphinx_highlight.js"></script>
    <script src="_static/js/theme.js"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="Extended" href="extended.html" />
    <link rel="prev" title="Installation" href="install.html" /> 
</head>

<body class="wy-body-for-nav"> 
  <div class="wy-grid-for-nav">
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
            <a href="index.html" class="icon icon-home"> Maximilian
          </a>
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>
        </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
              <p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="install.html">Installation</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Core</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#generators">Generators</a></li>
<li class="toctree-l2"><a class="reference internal" href="#filters">Filters</a></li>
<li class="toctree-l2"><a class="reference internal" href="#dynamics">Dynamics</a></li>
<li class="toctree-l2"><a class="reference internal" href="#effects">Effects</a></li>
<li class="toctree-l2"><a class="reference internal" href="#analysis">Analysis</a></li>
<li class="toctree-l2"><a class="reference internal" href="#sequencing">Sequencing</a></li>
<li class="toctree-l2"><a class="reference internal" href="#multichannel">Multichannel</a></li>
<li class="toctree-l2"><a class="reference internal" href="#utility-functions">Utility Functions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="extended.html">Extended</a></li>
</ul>

        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">Maximilian</a>
      </nav>

      <div class="wy-nav-content">
        <div class="rst-content">
          <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="index.html" class="icon icon-home"></a></li>
      <li class="breadcrumb-item active">Core</li>
      <li class="wy-breadcrumbs-aside">
            <a href="_sources/core.rst.txt" rel="nofollow"> View page source</a>
      </li>
  </ul>
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
             
  <section id="core">
<h1>Core<a class="headerlink" href="#core" title="Permalink to this heading"></a></h1>
<section id="generators">
<h2>Generators<a class="headerlink" href="#generators" title="Permalink to this heading"></a></h2>
<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv47maxiOsc">
<span id="_CPPv37maxiOsc"></span><span id="_CPPv27maxiOsc"></span><span id="maxiOsc"></span><span class="target" id="classmaxiOsc"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiOsc</span></span></span><a class="headerlink" href="#_CPPv47maxiOsc" title="Permalink to this definition"></a><br /></dt>
<dd><div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc6squareEd">
<span id="_CPPv3N7maxiOsc6squareEd"></span><span id="_CPPv2N7maxiOsc6squareEd"></span><span id="maxiOsc::square__double"></span><span class="target" id="classmaxiOsc_1a098187c5cca7e416439477d2f790a2e5"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">square</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc6squareEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Square wave oscillator </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>frequency</strong> – in Hz </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc8sinewaveEd">
<span id="_CPPv3N7maxiOsc8sinewaveEd"></span><span id="_CPPv2N7maxiOsc8sinewaveEd"></span><span id="maxiOsc::sinewave__double"></span><span class="target" id="classmaxiOsc_1a0a9fca78897f5def1e3202c976950f9c"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">sinewave</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc8sinewaveEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Sine wave oscillator </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>frequency</strong> – in Hz </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc7coswaveEd">
<span id="_CPPv3N7maxiOsc7coswaveEd"></span><span id="_CPPv2N7maxiOsc7coswaveEd"></span><span id="maxiOsc::coswave__double"></span><span class="target" id="classmaxiOsc_1aa7d05ba1f846e1d2b3c12f16f74b851a"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">coswave</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc7coswaveEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Cosine wave oscillator </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>frequency</strong> – in Hz </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc3sawEd">
<span id="_CPPv3N7maxiOsc3sawEd"></span><span id="_CPPv2N7maxiOsc3sawEd"></span><span id="maxiOsc::saw__double"></span><span class="target" id="classmaxiOsc_1aaf7c3d0064e46ce0e4e2c354d9ed37b8"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">saw</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc3sawEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Saw wave oscillator</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>frequency</strong> – in Hz </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc6phasorEd">
<span id="_CPPv3N7maxiOsc6phasorEd"></span><span id="_CPPv2N7maxiOsc6phasorEd"></span><span id="maxiOsc::phasor__double"></span><span class="target" id="classmaxiOsc_1af6d7b7b4a167aa90d5bb54f2e2228da4"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">phasor</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc6phasorEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>A ramp rising from 0 to 1</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>frequency</strong> – in Hz </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc13phasorBetweenEddd">
<span id="_CPPv3N7maxiOsc13phasorBetweenEddd"></span><span id="_CPPv2N7maxiOsc13phasorBetweenEddd"></span><span id="maxiOsc::phasorBetween__double.double.double"></span><span class="target" id="classmaxiOsc_1aa64f53d111cfc0c1d8acf3c76b1249be"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">phasorBetween</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">startphase</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">endphase</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc13phasorBetweenEddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>A ramp rising from 0 to 1</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>frequency</strong> – in Hz </p></li>
<li><p><strong>startPhase</strong> – the start point of the phasor (0-1) </p></li>
<li><p><strong>endPhase</strong> – the end point of the phasor (0-1) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc8triangleEd">
<span id="_CPPv3N7maxiOsc8triangleEd"></span><span id="_CPPv2N7maxiOsc8triangleEd"></span><span id="maxiOsc::triangle__double"></span><span class="target" id="classmaxiOsc_1ac846ac3de1a73c03b8d9afc0eba39df3"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">triangle</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc8triangleEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Triangle oscillator</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>frequency</strong> – in Hz </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc5pulseEdd">
<span id="_CPPv3N7maxiOsc5pulseEdd"></span><span id="_CPPv2N7maxiOsc5pulseEdd"></span><span id="maxiOsc::pulse__double.double"></span><span class="target" id="classmaxiOsc_1a69780c8da87b6ebc3597f72025d502ae"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">pulse</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">duty</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc5pulseEdd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Pulse wave oscillator</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>frequency</strong> – in Hz</p></li>
<li><p><strong>duty</strong> – Pulse width (0-1) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc7impulseEd">
<span id="_CPPv3N7maxiOsc7impulseEd"></span><span id="_CPPv2N7maxiOsc7impulseEd"></span><span id="maxiOsc::impulse__double"></span><span class="target" id="classmaxiOsc_1aba124622a61301d7763a5bf57a025a57"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">impulse</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc7impulseEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Impulse generator</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>frequency</strong> – in Hz </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc7sinebufEd">
<span id="_CPPv3N7maxiOsc7sinebufEd"></span><span id="_CPPv2N7maxiOsc7sinebufEd"></span><span id="maxiOsc::sinebuf__double"></span><span class="target" id="classmaxiOsc_1af1ee1a5b8f291ac082edc56f4e192652"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">sinebuf</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc7sinebufEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Fast sine wave oscillator, generated from a wavetable with linear interpolation</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>frequency</strong> – in Hz </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc5noiseEv">
<span id="_CPPv3N7maxiOsc5noiseEv"></span><span id="_CPPv2N7maxiOsc5noiseEv"></span><span id="maxiOsc::noise"></span><span class="target" id="classmaxiOsc_1abc35e908713ec53d584e38330bf63c57"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">noise</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc5noiseEv" title="Permalink to this definition"></a><br /></dt>
<dd><p>White noise generator </p>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc8sinebuf4Ed">
<span id="_CPPv3N7maxiOsc8sinebuf4Ed"></span><span id="_CPPv2N7maxiOsc8sinebuf4Ed"></span><span id="maxiOsc::sinebuf4__double"></span><span class="target" id="classmaxiOsc_1a0df1f7890617df92a08e29026f27936b"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">sinebuf4</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc8sinebuf4Ed" title="Permalink to this definition"></a><br /></dt>
<dd><p>Fast sine wave oscillator, generated from a wavetable with quadratic interpolation</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>frequency</strong> – in Hz </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc4sawnEd">
<span id="_CPPv3N7maxiOsc4sawnEd"></span><span id="_CPPv2N7maxiOsc4sawnEd"></span><span id="maxiOsc::sawn__double"></span><span class="target" id="classmaxiOsc_1ae6ff9fadfe052e8fdfb800be94e748b9"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">sawn</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc4sawnEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Anti-aliases saw wave oscillator</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>frequency</strong> – in Hz </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiOsc10phaseResetEd">
<span id="_CPPv3N7maxiOsc10phaseResetEd"></span><span id="_CPPv2N7maxiOsc10phaseResetEd"></span><span id="maxiOsc::phaseReset__double"></span><span class="target" id="classmaxiOsc_1a42752809b4622af434efcb375e498daa"></span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">phaseReset</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">phaseIn</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiOsc10phaseResetEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the phase of the oscillator</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>phaseIn</strong> – The phase, from 0 to 1 </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv410maxiSample">
<span id="_CPPv310maxiSample"></span><span id="_CPPv210maxiSample"></span><span id="maxiSample"></span><span class="target" id="classmaxiSample"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiSample</span></span></span><a class="headerlink" href="#_CPPv410maxiSample" title="Permalink to this definition"></a><br /></dt>
<dd><p>A sampler </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample9getLengthEv">
<span id="_CPPv3N10maxiSample9getLengthEv"></span><span id="_CPPv2N10maxiSample9getLengthEv"></span><span id="maxiSample::getLength"></span><span class="target" id="classmaxiSample_1ad4d683ac579e9eb38305383eb9b4df5f"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">getLength</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample9getLengthEv" title="Permalink to this definition"></a><br /></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>The length of the sample, in samples </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSampleaSERK10maxiSample">
<span id="_CPPv3N10maxiSampleaSERK10maxiSample"></span><span id="_CPPv2N10maxiSampleaSERK10maxiSample"></span><span id="maxiSample::assign-operator__maxiSampleCR"></span><span class="target" id="classmaxiSample_1a3be61f10965fbca8bc2440c5b22c1daa"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><a class="reference internal" href="#_CPPv410maxiSample" title="maxiSample"><span class="n"><span class="pre">maxiSample</span></span></a><span class="w"> </span><span class="p"><span class="pre">&amp;</span></span><span class="sig-name descname"><span class="k"><span class="pre">operator</span></span><span class="o"><span class="pre">=</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><a class="reference internal" href="#_CPPv410maxiSample" title="maxiSample"><span class="n"><span class="pre">maxiSample</span></span></a><span class="w"> </span><span class="p"><span class="pre">&amp;</span></span><span class="n sig-param"><span class="pre">source</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSampleaSERK10maxiSample" title="Permalink to this definition"></a><br /></dt>
<dd><p>Use the = operator to copy from one sample to another</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>source</strong> – another <a class="reference internal" href="#classmaxiSample"><span class="std std-ref">maxiSample</span></a> instance </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample4loadE6stringi">
<span id="_CPPv3N10maxiSample4loadE6stringi"></span><span id="_CPPv2N10maxiSample4loadE6stringi"></span><span id="maxiSample::load__string.i"></span><span class="target" id="classmaxiSample_1a68c12e14649369d0657eca87a2a2929f"></span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">load</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">string</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">fileName</span></span>, <span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">channel</span></span><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="m"><span class="pre">0</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample4loadE6stringi" title="Permalink to this definition"></a><br /></dt>
<dd><p>Load a mono channel from a file in wav format</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>fileName</strong> – the file name</p></li>
<li><p><strong>channel</strong> – the index of the channel to read </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample4saveEv">
<span id="_CPPv3N10maxiSample4saveEv"></span><span id="_CPPv2N10maxiSample4saveEv"></span><span id="maxiSample::save"></span><span class="target" id="classmaxiSample_1a74b554b7101576bfda87485ebc23bf50"></span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">save</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample4saveEv" title="Permalink to this definition"></a><br /></dt>
<dd><p>Save the file </p>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample4saveE6string">
<span id="_CPPv3N10maxiSample4saveE6string"></span><span id="_CPPv2N10maxiSample4saveE6string"></span><span id="maxiSample::save__string"></span><span class="target" id="classmaxiSample_1ae28feb485fe1c5cd3d9303b9a610e3f3"></span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">save</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">string</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">filename</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample4saveE6string" title="Permalink to this definition"></a><br /></dt>
<dd><p>Save the file, specifying a file name</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>filename</strong> – The file name </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample10getSummaryEv">
<span id="_CPPv3N10maxiSample10getSummaryEv"></span><span id="_CPPv2N10maxiSample10getSummaryEv"></span><span id="maxiSample::getSummary"></span><span class="target" id="classmaxiSample_1a87e0ccbe82846d466057f5387d40074c"></span><span class="n"><span class="pre">string</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">getSummary</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample10getSummaryEv" title="Permalink to this definition"></a><br /></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>a printable summary of the wav file </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample7isReadyEv">
<span id="_CPPv3N10maxiSample7isReadyEv"></span><span id="_CPPv2N10maxiSample7isReadyEv"></span><span id="maxiSample::isReady"></span><span class="target" id="classmaxiSample_1acad0809020e1e4a4856e286c423fcdc1"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">isReady</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample7isReadyEv" title="Permalink to this definition"></a><br /></dt>
<dd><p>Check if the sample is loaded </p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>true if the sample is ready to play </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample9setSampleE15DOUBLEARRAY_REF">
<span id="_CPPv3N10maxiSample9setSampleE15DOUBLEARRAY_REF"></span><span id="_CPPv2N10maxiSample9setSampleE15DOUBLEARRAY_REF"></span><span id="maxiSample::setSample__DOUBLEARRAY_REF"></span><span class="target" id="classmaxiSample_1a121b20a694166102d3d1f56b47e22816"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setSample</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">DOUBLEARRAY_REF</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">_sampleData</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample9setSampleE15DOUBLEARRAY_REF" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the sample from an external array</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>_sampleData</strong> – An double array (JS) or vector (C++) of data </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample16setSampleAndRateE15DOUBLEARRAY_REFi">
<span id="_CPPv3N10maxiSample16setSampleAndRateE15DOUBLEARRAY_REFi"></span><span id="_CPPv2N10maxiSample16setSampleAndRateE15DOUBLEARRAY_REFi"></span><span id="maxiSample::setSampleAndRate__DOUBLEARRAY_REF.i"></span><span class="target" id="classmaxiSample_1a64a0821a036614d095496aed6d674521"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setSampleAndRate</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">DOUBLEARRAY_REF</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">_sampleData</span></span>, <span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">sampleRate</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample16setSampleAndRateE15DOUBLEARRAY_REFi" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the sample from an external array, and set the sample rate </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>_sampleData</strong> – An double array (JS) or vector (C++) of data </p></li>
<li><p><strong>sampleRate</strong> – the sample rate </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample5clearEv">
<span id="_CPPv3N10maxiSample5clearEv"></span><span id="_CPPv2N10maxiSample5clearEv"></span><span id="maxiSample::clear"></span><span class="target" id="classmaxiSample_1aec108418582368d630ef47d25f9fefea"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">clear</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample5clearEv" title="Permalink to this definition"></a><br /></dt>
<dd><p>Clear the sample data </p>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample7triggerEv">
<span id="_CPPv3N10maxiSample7triggerEv"></span><span id="_CPPv2N10maxiSample7triggerEv"></span><span id="maxiSample::trigger"></span><span class="target" id="classmaxiSample_1a4c47dacfbb6514804501968dca4f0293"></span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">trigger</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample7triggerEv" title="Permalink to this definition"></a><br /></dt>
<dd><p>Trigger the sample from the start </p>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample10loopRecordEdKbKddd">
<span id="_CPPv3N10maxiSample10loopRecordEdKbKddd"></span><span id="_CPPv2N10maxiSample10loopRecordEdKbKddd"></span><span id="maxiSample::loopRecord__double.bC.doubleC.double.double"></span><span class="target" id="classmaxiSample_1acb43b87dab432c7667ce91b0f2410d0c"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">loopRecord</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">newSample</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">recordEnabled</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">recordMix</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">start</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">end</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample10loopRecordEdKbKddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Record into the sample buffer </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>newSample</strong> – a signal </p></li>
<li><p><strong>recordEnabled</strong> – set to true to record into the loop </p></li>
<li><p><strong>recordMix</strong> – the balance between existing sample and the new signal (1 = overdub, 0=no recording, 0.5=equal mix) </p></li>
<li><p><strong>start</strong> – the loop start point (0-1) </p></li>
<li><p><strong>end</strong> – the loop end point (0-1) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample5resetEv">
<span id="_CPPv3N10maxiSample5resetEv"></span><span id="_CPPv2N10maxiSample5resetEv"></span><span id="maxiSample::reset"></span><span class="target" id="classmaxiSample_1a16e38d5c8b2b900c63b33faa5cb18748"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">reset</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample5resetEv" title="Permalink to this definition"></a><br /></dt>
<dd><p>Reset the sample to play from the start </p>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample4playEv">
<span id="_CPPv3N10maxiSample4playEv"></span><span id="_CPPv2N10maxiSample4playEv"></span><span id="maxiSample::play"></span><span class="target" id="classmaxiSample_1a6b55dc845a7c469f694a05f284608a08"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">play</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample4playEv" title="Permalink to this definition"></a><br /></dt>
<dd><p>Play the sample, with no modification </p>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample14playWithPhasorEd">
<span id="_CPPv3N10maxiSample14playWithPhasorEd"></span><span id="_CPPv2N10maxiSample14playWithPhasorEd"></span><span id="maxiSample::playWithPhasor__double"></span><span class="target" id="classmaxiSample_1a6ddf6d384be710ef24ecc6f51db7fa6a"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">playWithPhasor</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">pha</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample14playWithPhasorEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Play the sample, providing a phasor to control the position</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>pha</strong> – a phasor signal (from 0 to 1) </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample8playLoopEdd">
<span id="_CPPv3N10maxiSample8playLoopEdd"></span><span id="_CPPv2N10maxiSample8playLoopEdd"></span><span id="maxiSample::playLoop__double.double"></span><span class="target" id="classmaxiSample_1a4f9b1bc00af98f9d11178ac8cfc87c11"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">playLoop</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">start</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">end</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample8playLoopEdd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Play the sample in a loop</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>start</strong> – start position (0-1)</p></li>
<li><p><strong>end</strong> – end position (0-1) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample8playOnceEv">
<span id="_CPPv3N10maxiSample8playOnceEv"></span><span id="_CPPv2N10maxiSample8playOnceEv"></span><span id="maxiSample::playOnce"></span><span class="target" id="classmaxiSample_1ae9acd1c13f043387c395422dfe074ddb"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">playOnce</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample8playOnceEv" title="Permalink to this definition"></a><br /></dt>
<dd><p>Play the sample once and stop </p>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample8playOnZXEd">
<span id="_CPPv3N10maxiSample8playOnZXEd"></span><span id="_CPPv2N10maxiSample8playOnZXEd"></span><span id="maxiSample::playOnZX__double"></span><span class="target" id="classmaxiSample_1addba352aea15b361b2c134088868e162"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">playOnZX</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">trigger</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample8playOnZXEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Play the sample when a trigger is received</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>trigger</strong> – a signal </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample15playOnZXAtSpeedEdd">
<span id="_CPPv3N10maxiSample15playOnZXAtSpeedEdd"></span><span id="_CPPv2N10maxiSample15playOnZXAtSpeedEdd"></span><span id="maxiSample::playOnZXAtSpeed__double.double"></span><span class="target" id="classmaxiSample_1aabdceda1434c6b9fffa5ca67127685ea"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">playOnZXAtSpeed</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">trig</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">speed</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample15playOnZXAtSpeedEdd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Play the sample when a trigger is received, at a modified speed</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>trigger</strong> – a signal</p></li>
<li><p><strong>speed</strong> – the speed multiplier (1=no change, 2=double etc) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample25playOnZXAtSpeedFromOffsetEddd">
<span id="_CPPv3N10maxiSample25playOnZXAtSpeedFromOffsetEddd"></span><span id="_CPPv2N10maxiSample25playOnZXAtSpeedFromOffsetEddd"></span><span id="maxiSample::playOnZXAtSpeedFromOffset__double.double.double"></span><span class="target" id="classmaxiSample_1acee703cdfa24a665698dc48be1295b07"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">playOnZXAtSpeedFromOffset</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">trig</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">speed</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">offset</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample25playOnZXAtSpeedFromOffsetEddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Play the sample when a trigger is received, at a modified speed from a specific position</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>trigger</strong> – a signal</p></li>
<li><p><strong>speed</strong> – the speed multiplier (1=no change, 2=double etc)</p></li>
<li><p><strong>offset</strong> – the start position (0-1) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample28playOnZXAtSpeedBetweenPointsEdddd">
<span id="_CPPv3N10maxiSample28playOnZXAtSpeedBetweenPointsEdddd"></span><span id="_CPPv2N10maxiSample28playOnZXAtSpeedBetweenPointsEdddd"></span><span id="maxiSample::playOnZXAtSpeedBetweenPoints__double.double.double.double"></span><span class="target" id="classmaxiSample_1a09b70b7f207dfd889c27f07dc1499b39"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">playOnZXAtSpeedBetweenPoints</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">trig</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">speed</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">offset</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">length</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample28playOnZXAtSpeedBetweenPointsEdddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Play the sample when a trigger is received, at a modified speed beween two positions</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>trigger</strong> – a signal</p></li>
<li><p><strong>speed</strong> – the speed multiplier (1=no change, 2=double etc)</p></li>
<li><p><strong>offset</strong> – the start position (0-1)</p></li>
<li><p><strong>length</strong> – the length of the segment (0-1) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample14loopSetPosOnZXEdd">
<span id="_CPPv3N10maxiSample14loopSetPosOnZXEdd"></span><span id="_CPPv2N10maxiSample14loopSetPosOnZXEdd"></span><span id="maxiSample::loopSetPosOnZX__double.double"></span><span class="target" id="classmaxiSample_1a0d58b0c957296ba0d8b06535616c1630"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">loopSetPosOnZX</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">trigger</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">position</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample14loopSetPosOnZXEdd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Loop the sample, and set the playback position to a specific point when a trigger is received</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>trigger</strong> – a signal</p></li>
<li><p><strong>position</strong> – the position to move to when a trigger is recevied </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample15playOnceAtSpeedEd">
<span id="_CPPv3N10maxiSample15playOnceAtSpeedEd"></span><span id="_CPPv2N10maxiSample15playOnceAtSpeedEd"></span><span id="maxiSample::playOnceAtSpeed__double"></span><span class="target" id="classmaxiSample_1ae2b6fbd44eae6df6b59461b96997cf9d"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">playOnceAtSpeed</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">speed</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample15playOnceAtSpeedEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Play the samples once, at a modified speed</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>speed</strong> – a speed multiplier </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample11setPositionEd">
<span id="_CPPv3N10maxiSample11setPositionEd"></span><span id="_CPPv2N10maxiSample11setPositionEd"></span><span id="maxiSample::setPosition__double"></span><span class="target" id="classmaxiSample_1a678ec42067934e9db35a5c68f8d5ab13"></span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setPosition</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">newPos</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample11setPositionEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the playback position</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>newPos</strong> – (0-1) </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample9playUntilEd">
<span id="_CPPv3N10maxiSample9playUntilEd"></span><span id="_CPPv2N10maxiSample9playUntilEd"></span><span id="maxiSample::playUntil__double"></span><span class="target" id="classmaxiSample_1aea817557fc69ae5541b56ab8415f1664"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">playUntil</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">end</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample9playUntilEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Play from the start to a specific position</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>end</strong> – the end point (0-1) </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample16playUntilAtSpeedEdd">
<span id="_CPPv3N10maxiSample16playUntilAtSpeedEdd"></span><span id="_CPPv2N10maxiSample16playUntilAtSpeedEdd"></span><span id="maxiSample::playUntilAtSpeed__double.double"></span><span class="target" id="classmaxiSample_1a69b3dc2950e4068fa66e709b4566b8ff"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">playUntilAtSpeed</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">end</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">speed</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample16playUntilAtSpeedEdd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Play from the start to a specific position, at a modified speed</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>end</strong> – the end point (0-1)</p></li>
<li><p><strong>speed</strong> – a speed multiplier </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample11playAtSpeedEd">
<span id="_CPPv3N10maxiSample11playAtSpeedEd"></span><span id="_CPPv2N10maxiSample11playAtSpeedEd"></span><span id="maxiSample::playAtSpeed__double"></span><span class="target" id="classmaxiSample_1ae5e0e29a78a0a614cda56c8b18c502b9"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">playAtSpeed</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">speed</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample11playAtSpeedEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Play at a modified speed</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>speed</strong> – a speed multiplier </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample31playAtSpeedBetweenPointsFromPosEdddd">
<span id="_CPPv3N10maxiSample31playAtSpeedBetweenPointsFromPosEdddd"></span><span id="_CPPv2N10maxiSample31playAtSpeedBetweenPointsFromPosEdddd"></span><span id="maxiSample::playAtSpeedBetweenPointsFromPos__double.double.double.double"></span><span class="target" id="classmaxiSample_1a01ee0f3bd478bf1d68d5eef95eedaa0e"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">playAtSpeedBetweenPointsFromPos</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">start</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">end</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">pos</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample31playAtSpeedBetweenPointsFromPosEdddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Play at a modified speed between two points, from a position</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>frequency</strong> – the playback pitch (in Hz)</p></li>
<li><p><strong>start</strong> – the start point (in samples)</p></li>
<li><p><strong>end</strong> – the end point (in samples)</p></li>
<li><p><strong>pos</strong> – the starting position (in samples) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample24playAtSpeedBetweenPointsEddd">
<span id="_CPPv3N10maxiSample24playAtSpeedBetweenPointsEddd"></span><span id="_CPPv2N10maxiSample24playAtSpeedBetweenPointsEddd"></span><span id="maxiSample::playAtSpeedBetweenPoints__double.double.double"></span><span class="target" id="classmaxiSample_1a3c98528d31b07ef965cc35b2de854c3d"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">playAtSpeedBetweenPoints</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">start</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">end</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample24playAtSpeedBetweenPointsEddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Play at a modified speed between two points</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>frequency</strong> – the playback pitch (in Hz)</p></li>
<li><p><strong>start</strong> – the start point (in samples)</p></li>
<li><p><strong>end</strong> – the end point (in samples) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample5play4Eddd">
<span id="_CPPv3N10maxiSample5play4Eddd"></span><span id="_CPPv2N10maxiSample5play4Eddd"></span><span id="maxiSample::play4__double.double.double"></span><span class="target" id="classmaxiSample_1a9fc13e53377f8c656353d76792030c71"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">play4</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">start</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">end</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample5play4Eddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Play at a modified speed between two points, using quadratic interpolation</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>frequency</strong> – the playback pitch (in Hz)</p></li>
<li><p><strong>start</strong> – the start point (in samples)</p></li>
<li><p><strong>end</strong> – the end point (in samples) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample9normaliseEd">
<span id="_CPPv3N10maxiSample9normaliseEd"></span><span id="_CPPv2N10maxiSample9normaliseEd"></span><span id="maxiSample::normalise__double"></span><span class="target" id="classmaxiSample_1a05feb902469c2e54f5fa5086b9247609"></span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">normalise</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">maxLevel</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample9normaliseEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Normalise the sample buffer</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>maxLevel</strong> – the maximum absolute level </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiSample8autoTrimEffbb">
<span id="_CPPv3N10maxiSample8autoTrimEffbb"></span><span id="_CPPv2N10maxiSample8autoTrimEffbb"></span><span id="maxiSample::autoTrim__float.float.b.b"></span><span class="target" id="classmaxiSample_1a63dadfb8b26acae6b002469223b3728c"></span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">autoTrim</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">float</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">alpha</span></span>, <span class="kt"><span class="pre">float</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">threshold</span></span>, <span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">trimStart</span></span>, <span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">trimEnd</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiSample8autoTrimEffbb" title="Permalink to this definition"></a><br /></dt>
<dd><p>Trim the sample buffer to remove silence from the ends</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>alpha</strong> – the sensitivity</p></li>
<li><p><strong>threshold</strong> – the value above which to start trimming</p></li>
<li><p><strong>trimStart</strong> – true if the start should be trimmed</p></li>
<li><p><strong>trimEnd</strong> – true if the end should be trimmed </p></li>
</ul>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv410maxiEnvGen">
<span id="_CPPv310maxiEnvGen"></span><span id="_CPPv210maxiEnvGen"></span><span id="maxiEnvGen"></span><span class="target" id="classmaxiEnvGen"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiEnvGen</span></span></span><a class="headerlink" href="#_CPPv410maxiEnvGen" title="Permalink to this definition"></a><br /></dt>
<dd><p>An envelope generator. </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen4playEd">
<span id="_CPPv3N10maxiEnvGen4playEd"></span><span id="_CPPv2N10maxiEnvGen4playEd"></span><span id="maxiEnvGen::play__double"></span><span class="target" id="classmaxiEnvGen_1a96e2ba32a6c33be15cadbaece6181c45"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">play</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">trigger</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen4playEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Get the latest value of the envelope</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>trigger</strong> – A positive zero crossing (or constant 1) starts the envelope </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen5setupE11DOUBLEARRAY11DOUBLEARRAY11DOUBLEARRAYbb">
<span id="_CPPv3N10maxiEnvGen5setupE11DOUBLEARRAY11DOUBLEARRAY11DOUBLEARRAYbb"></span><span id="_CPPv2N10maxiEnvGen5setupE11DOUBLEARRAY11DOUBLEARRAY11DOUBLEARRAYbb"></span><span id="maxiEnvGen::setup__DOUBLEARRAY.DOUBLEARRAY.DOUBLEARRAY.b.b"></span><span class="target" id="classmaxiEnvGen_1ab0a6e01b809090475d41072fd33cc8e2"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setup</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">DOUBLEARRAY</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">levels</span></span>, <span class="n"><span class="pre">DOUBLEARRAY</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">times</span></span>, <span class="n"><span class="pre">DOUBLEARRAY</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">curves</span></span>, <span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">looping</span></span>, <span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">allowRetrigger</span></span><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="k"><span class="pre">false</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen5setupE11DOUBLEARRAY11DOUBLEARRAY11DOUBLEARRAYbb" title="Permalink to this definition"></a><br /></dt>
<dd><p>Configure the envelope generator </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>levels</strong> – An array of levels </p></li>
<li><p><strong>times</strong> – An array of times between the levels, in milliseconds. To make the envelope hold until the first negative zero crossing, use maxiEnvGen::HOLD as the time. Only one hold segment is allowed. </p></li>
<li><p><strong>curves</strong> – An array of exponential curve values to shape each segment (1 = straight, 2= squared, 0.5 = square root etc) </p></li>
<li><p><strong>looping</strong> – True if the envelope should infinitely repeat </p></li>
<li><p><strong>allowRetrigger</strong> – Set to true if the envelope should allow retriggering before it is finished, or false if the envelope should always reach the end before being allowed to restart Example C++ usage env.setup({0,1,0},{100,400}, {0.5,1}, false). levels should be one element longer than times and curves </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>True if the configuration was successful </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen5resetEv">
<span id="_CPPv3N10maxiEnvGen5resetEv"></span><span id="_CPPv2N10maxiEnvGen5resetEv"></span><span id="maxiEnvGen::reset"></span><span class="target" id="classmaxiEnvGen_1a0a4c8291678ffd7b78a272871be940e8"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">reset</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen5resetEv" title="Permalink to this definition"></a><br /></dt>
<dd><p>Restart the envelope immeadiately </p>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen11resetAndArmEv">
<span id="_CPPv3N10maxiEnvGen11resetAndArmEv"></span><span id="_CPPv2N10maxiEnvGen11resetAndArmEv"></span><span id="maxiEnvGen::resetAndArm"></span><span class="target" id="classmaxiEnvGen_1a2c39708258a5c71a40530d7473024b27"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">resetAndArm</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen11resetAndArmEv" title="Permalink to this definition"></a><br /></dt>
<dd><p>Stop the envelope and wait for a new trigger to start it </p>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen8setLevelE6size_td">
<span id="_CPPv3N10maxiEnvGen8setLevelE6size_td"></span><span id="_CPPv2N10maxiEnvGen8setLevelE6size_td"></span><span id="maxiEnvGen::setLevel__s.double"></span><span class="target" id="classmaxiEnvGen_1a42b258340290e2d6c8ccddcf87198600"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setLevel</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">index</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">value</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen8setLevelE6size_td" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the level of a segment of the envelope</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>index</strong> – The index of the level</p></li>
<li><p><strong>value</strong> – The new level </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen8setCurveE6size_td">
<span id="_CPPv3N10maxiEnvGen8setCurveE6size_td"></span><span id="_CPPv2N10maxiEnvGen8setCurveE6size_td"></span><span id="maxiEnvGen::setCurve__s.double"></span><span class="target" id="classmaxiEnvGen_1adddbd06ed361eb21599fad5c0bad19c2"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setCurve</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">index</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">value</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen8setCurveE6size_td" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the curve of a segment of the envelope</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>index</strong> – The index of the segment</p></li>
<li><p><strong>value</strong> – The new curve value </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen7setTimeE6size_td">
<span id="_CPPv3N10maxiEnvGen7setTimeE6size_td"></span><span id="_CPPv2N10maxiEnvGen7setTimeE6size_td"></span><span id="maxiEnvGen::setTime__s.double"></span><span class="target" id="classmaxiEnvGen_1a796ee97222111ff69c96956d9127ed33"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setTime</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">index</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">value</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen7setTimeE6size_td" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the length of a segment of the envelope</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>index</strong> – The index of the segment</p></li>
<li><p><strong>value</strong> – The new length (in ms) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen7setupAREKdKd">
<span id="_CPPv3N10maxiEnvGen7setupAREKdKd"></span><span id="_CPPv2N10maxiEnvGen7setupAREKdKd"></span><span id="maxiEnvGen::setupAR__doubleC.doubleC"></span><span class="target" id="classmaxiEnvGen_1a6147e310dbdbfab4269508ba25689f49"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setupAR</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">attack</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">release</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen7setupAREKdKd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Helper function to create a triangular envelope </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>attack</strong> – Rise time in ms </p></li>
<li><p><strong>release</strong> – Fall time in ms </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen8setupASREKdKd">
<span id="_CPPv3N10maxiEnvGen8setupASREKdKd"></span><span id="_CPPv2N10maxiEnvGen8setupASREKdKd"></span><span id="maxiEnvGen::setupASR__doubleC.doubleC"></span><span class="target" id="classmaxiEnvGen_1a74880edb5d611ab0f0838427cb2ac2bb"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setupASR</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">attack</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">release</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen8setupASREKdKd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Helper function to create a triangular(ish) envelope with sustain section at peak The sustain section will end when the trigger input drops below 0 </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>attack</strong> – Rise time in ms </p></li>
<li><p><strong>release</strong> – Fall time in ms </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen9setupADSREKdKdKdKd">
<span id="_CPPv3N10maxiEnvGen9setupADSREKdKdKdKd"></span><span id="_CPPv2N10maxiEnvGen9setupADSREKdKdKdKd"></span><span id="maxiEnvGen::setupADSR__doubleC.doubleC.doubleC.doubleC"></span><span class="target" id="classmaxiEnvGen_1af7d01608fa1a7e184922af2334cfbd20"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setupADSR</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">attack</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">decay</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">sustain</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">release</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen9setupADSREKdKdKdKd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Helper function to create an attack-decay-sustain-release envelope The sustain section will end when the trigger input drops below 0 The envelope will rise from 0 to 1 in the attack segment, then drop to the sustain level before falling to 0. </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>attack</strong> – Rise time in ms </p></li>
<li><p><strong>decay</strong> – Decay time in ms </p></li>
<li><p><strong>sustain</strong> – Sustain level </p></li>
<li><p><strong>release</strong> – Fall time in ms </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen12setRetriggerEKb">
<span id="_CPPv3N10maxiEnvGen12setRetriggerEKb"></span><span id="_CPPv2N10maxiEnvGen12setRetriggerEKb"></span><span id="maxiEnvGen::setRetrigger__bC"></span><span class="target" id="classmaxiEnvGen_1a0c2ef3a75479c03c8b2da3b92463179b"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setRetrigger</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">val</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen12setRetriggerEKb" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the envelope to retrigger or not</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>val</strong> – True is the envelope should retrigger, false if not </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen12getRetriggerEv">
<span id="_CPPv3N10maxiEnvGen12getRetriggerEv"></span><span id="_CPPv2N10maxiEnvGen12getRetriggerEv"></span><span id="maxiEnvGen::getRetrigger"></span><span class="target" id="classmaxiEnvGen_1ab4efdf967063ed0fa6273a86802ccf86"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">getRetrigger</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen12getRetriggerEv" title="Permalink to this definition"></a><br /></dt>
<dd><p>Find out if the envelope retriggers </p>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen7setLoopEKb">
<span id="_CPPv3N10maxiEnvGen7setLoopEKb"></span><span id="_CPPv2N10maxiEnvGen7setLoopEKb"></span><span id="maxiEnvGen::setLoop__bC"></span><span class="target" id="classmaxiEnvGen_1a2c15ef4a7b33ba598ecf4a74f159d158"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setLoop</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">val</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen7setLoopEKb" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the envelope to loop or not</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>val</strong> – True is the envelope should loop, false if not </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiEnvGen7getLoopEv">
<span id="_CPPv3N10maxiEnvGen7getLoopEv"></span><span id="_CPPv2N10maxiEnvGen7getLoopEv"></span><span id="maxiEnvGen::getLoop"></span><span class="target" id="classmaxiEnvGen_1a048d75d16095cb694bb4609136196867"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">getLoop</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiEnvGen7getLoopEv" title="Permalink to this definition"></a><br /></dt>
<dd><p>Find out if the envelope loops </p>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv48maxiLine">
<span id="_CPPv38maxiLine"></span><span id="_CPPv28maxiLine"></span><span id="maxiLine"></span><span class="target" id="classmaxiLine"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiLine</span></span></span><a class="headerlink" href="#_CPPv48maxiLine" title="Permalink to this definition"></a><br /></dt>
<dd><p>A line generator (you can also use <a class="reference internal" href="#classmaxiEnvGen"><span class="std std-ref">maxiEnvGen</span></a>) </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N8maxiLine4playEd">
<span id="_CPPv3N8maxiLine4playEd"></span><span id="_CPPv2N8maxiLine4playEd"></span><span id="maxiLine::play__double"></span><span class="target" id="classmaxiLine_1ae892e5ffc0bda8df5b938b71c01aaa76"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">play</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">trigger</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N8maxiLine4playEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Generate a line, when a trigger is received</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>trigger</strong> – a signal </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N8maxiLine7prepareEdddb">
<span id="_CPPv3N8maxiLine7prepareEdddb"></span><span id="_CPPv2N8maxiLine7prepareEdddb"></span><span id="maxiLine::prepare__double.double.double.b"></span><span class="target" id="classmaxiLine_1a21ab66a82caff8b9a10169daadf78b86"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">prepare</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">start</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">end</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">durationMs</span></span>, <span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">isOneShot</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N8maxiLine7prepareEdddb" title="Permalink to this definition"></a><br /></dt>
<dd><p>Setup the line before it is triggered </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>start</strong> – the starting value of the line </p></li>
<li><p><strong>end</strong> – the ending value of the line </p></li>
<li><p><strong>durationMs</strong> – the duration of the line (in milliseconds) </p></li>
<li><p><strong>isOneShot</strong> – true is the line should not play once, or false if it should loop </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a signal </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N8maxiLine13triggerEnableEd">
<span id="_CPPv3N8maxiLine13triggerEnableEd"></span><span id="_CPPv2N8maxiLine13triggerEnableEd"></span><span id="maxiLine::triggerEnable__double"></span><span class="target" id="classmaxiLine_1ad15bb57d04e581a50f4b401a12359b39"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">triggerEnable</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">on</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N8maxiLine13triggerEnableEd" title="Permalink to this definition"></a><br /></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>0</strong> – or less to protect the generator from triggering, more than 0 to enable it to be triggered </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N8maxiLine14isLineCompleteEv">
<span id="_CPPv3N8maxiLine14isLineCompleteEv"></span><span id="_CPPv2N8maxiLine14isLineCompleteEv"></span><span id="maxiLine::isLineComplete"></span><span class="target" id="classmaxiLine_1a4f6a012fe20ff2230877e2ada9f83499"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">isLineComplete</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N8maxiLine14isLineCompleteEv" title="Permalink to this definition"></a><br /></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>true if the line generator has finished </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv422maxiKuramotoOscillator">
<span id="_CPPv322maxiKuramotoOscillator"></span><span id="_CPPv222maxiKuramotoOscillator"></span><span id="maxiKuramotoOscillator"></span><span class="target" id="classmaxiKuramotoOscillator"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiKuramotoOscillator</span></span></span><a class="headerlink" href="#_CPPv422maxiKuramotoOscillator" title="Permalink to this definition"></a><br /></dt>
<dd><p>A kuramoto oscillator</p>
<p>This is an adaptive oscillator that adjusts its own phase in relation to the phases of other kuramoto oscillators</p>
<p>For further info, see <a class="reference external" href="https://tutorials.siam.org/dsweb/cotutorial/index.php?s=3&amp;p=0">https://tutorials.siam.org/dsweb/cotutorial/index.php?s=3&amp;p=0</a> <a class="reference external" href="https://www.complexity-explorables.org/explorables/ride-my-kuramotocycle/">https://www.complexity-explorables.org/explorables/ride-my-kuramotocycle/</a> </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N22maxiKuramotoOscillator4playEddNSt6vectorIdEE">
<span id="_CPPv3N22maxiKuramotoOscillator4playEddNSt6vectorIdEE"></span><span id="_CPPv2N22maxiKuramotoOscillator4playEddNSt6vectorIdEE"></span><span id="maxiKuramotoOscillator::play__double.double.std::vector:double:"></span><span class="target" id="classmaxiKuramotoOscillator_1aaa1c665afa490b2cd45b116a23cd4ee5"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">play</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">freq</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">K</span></span>, <span class="n"><span class="pre">std</span></span><span class="p"><span class="pre">::</span></span><span class="n"><span class="pre">vector</span></span><span class="p"><span class="pre">&lt;</span></span><span class="kt"><span class="pre">double</span></span><span class="p"><span class="pre">&gt;</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">phases</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N22maxiKuramotoOscillator4playEddNSt6vectorIdEE" title="Permalink to this definition"></a><br /></dt>
<dd><p>Run the oscillator </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>freq</strong> – the intended frequency of the oscillator </p></li>
<li><p><strong>K</strong> – the strengh of coupling between oscillators </p></li>
<li><p><strong>phases</strong> – a vector of the phases of other kuramoto oscillators </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the current amplitude of the oscillator </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N22maxiKuramotoOscillator8setPhaseEd">
<span id="_CPPv3N22maxiKuramotoOscillator8setPhaseEd"></span><span id="_CPPv2N22maxiKuramotoOscillator8setPhaseEd"></span><span id="maxiKuramotoOscillator::setPhase__double"></span><span class="target" id="classmaxiKuramotoOscillator_1a6e06188b46a440a5783291d2f0dc33b6"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setPhase</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">newPhase</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N22maxiKuramotoOscillator8setPhaseEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the phase of the oscillator</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>newPhase</strong> – the phase, 0 - 2PI </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N22maxiKuramotoOscillator8getPhaseEv">
<span id="_CPPv3N22maxiKuramotoOscillator8getPhaseEv"></span><span id="_CPPv2N22maxiKuramotoOscillator8getPhaseEv"></span><span id="maxiKuramotoOscillator::getPhase"></span><span class="target" id="classmaxiKuramotoOscillator_1af977c10b9b34a677d17d82b3ae432791"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">getPhase</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N22maxiKuramotoOscillator8getPhaseEv" title="Permalink to this definition"></a><br /></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>the current phase of the oscillator </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv425maxiKuramotoOscillatorSet">
<span id="_CPPv325maxiKuramotoOscillatorSet"></span><span id="_CPPv225maxiKuramotoOscillatorSet"></span><span id="maxiKuramotoOscillatorSet"></span><span class="target" id="classmaxiKuramotoOscillatorSet"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiKuramotoOscillatorSet</span></span></span><a class="headerlink" href="#_CPPv425maxiKuramotoOscillatorSet" title="Permalink to this definition"></a><br /></dt>
<dd><p>This class managed a group of Kuramoto oscillators (see <a class="reference internal" href="#classmaxiKuramotoOscillator"><span class="std std-ref">maxiKuramotoOscillator</span></a>) </p>
<p>Subclassed by <a class="reference internal" href="#classmaxiAsyncKuramotoOscillator"><span class="std std-ref">maxiAsyncKuramotoOscillator</span></a></p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N25maxiKuramotoOscillatorSet25maxiKuramotoOscillatorSetEK6size_t">
<span id="_CPPv3N25maxiKuramotoOscillatorSet25maxiKuramotoOscillatorSetEK6size_t"></span><span id="_CPPv2N25maxiKuramotoOscillatorSet25maxiKuramotoOscillatorSetEK6size_t"></span><span id="maxiKuramotoOscillatorSet::maxiKuramotoOscillatorSet__sC"></span><span class="target" id="classmaxiKuramotoOscillatorSet_1a73d5ecf3d6aedd36ba077b9fbaaae891"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiKuramotoOscillatorSet</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">N</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N25maxiKuramotoOscillatorSet25maxiKuramotoOscillatorSetEK6size_t" title="Permalink to this definition"></a><br /></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>N</strong> – The number of oscillators in the group </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N25maxiKuramotoOscillatorSet9setPhasesERKNSt6vectorIdEE">
<span id="_CPPv3N25maxiKuramotoOscillatorSet9setPhasesERKNSt6vectorIdEE"></span><span id="_CPPv2N25maxiKuramotoOscillatorSet9setPhasesERKNSt6vectorIdEE"></span><span id="maxiKuramotoOscillatorSet::setPhases__std::vector:double:CR"></span><span class="target" id="classmaxiKuramotoOscillatorSet_1a801c20b123abbd5447f98ca2d0d21c06"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setPhases</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">std</span></span><span class="p"><span class="pre">::</span></span><span class="n"><span class="pre">vector</span></span><span class="p"><span class="pre">&lt;</span></span><span class="kt"><span class="pre">double</span></span><span class="p"><span class="pre">&gt;</span></span><span class="w"> </span><span class="p"><span class="pre">&amp;</span></span><span class="n sig-param"><span class="pre">phases</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N25maxiKuramotoOscillatorSet9setPhasesERKNSt6vectorIdEE" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the phases of all of the oscillators</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>phases</strong> – a vector of phases (all 0 - 2PI) </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N25maxiKuramotoOscillatorSet8setPhaseEKdK6size_t">
<span id="_CPPv3N25maxiKuramotoOscillatorSet8setPhaseEKdK6size_t"></span><span id="_CPPv2N25maxiKuramotoOscillatorSet8setPhaseEKdK6size_t"></span><span id="maxiKuramotoOscillatorSet::setPhase__doubleC.sC"></span><span class="target" id="classmaxiKuramotoOscillatorSet_1afca0c47a523e883fd1e14b3c951776ac"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setPhase</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">phase</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">oscillatorIdx</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N25maxiKuramotoOscillatorSet8setPhaseEKdK6size_t" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the phase of a single oscillator</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>phase</strong> – the phase, 0 - 2PI</p></li>
<li><p><strong>oscillatorIdx</strong> – the index of the oscillator </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N25maxiKuramotoOscillatorSet8getPhaseE6size_t">
<span id="_CPPv3N25maxiKuramotoOscillatorSet8getPhaseE6size_t"></span><span id="_CPPv2N25maxiKuramotoOscillatorSet8getPhaseE6size_t"></span><span id="maxiKuramotoOscillatorSet::getPhase__s"></span><span class="target" id="classmaxiKuramotoOscillatorSet_1a3dc3360dd6f61813259389605f4756e9"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">getPhase</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">i</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N25maxiKuramotoOscillatorSet8getPhaseE6size_t" title="Permalink to this definition"></a><br /></dt>
<dd><p>Get the phase of a single oscillator</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>i</strong> – the index of the oscillator </p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the oscillator’s phase </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N25maxiKuramotoOscillatorSet4sizeEv">
<span id="_CPPv3N25maxiKuramotoOscillatorSet4sizeEv"></span><span id="_CPPv2N25maxiKuramotoOscillatorSet4sizeEv"></span><span id="maxiKuramotoOscillatorSet::size"></span><span class="target" id="classmaxiKuramotoOscillatorSet_1a82024e81b9af017de88c119924c9fb71"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">size</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N25maxiKuramotoOscillatorSet4sizeEv" title="Permalink to this definition"></a><br /></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>the number of oscillators in the group </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N25maxiKuramotoOscillatorSet4playEdd">
<span id="_CPPv3N25maxiKuramotoOscillatorSet4playEdd"></span><span id="_CPPv2N25maxiKuramotoOscillatorSet4playEdd"></span><span id="maxiKuramotoOscillatorSet::play__double.double"></span><span class="target" id="classmaxiKuramotoOscillatorSet_1ad22aa34111c245897a3e64207879f03e"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">play</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">freq</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">K</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N25maxiKuramotoOscillatorSet4playEdd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Run all of the oscillators </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>freq</strong> – the intended frequency </p></li>
<li><p><strong>K</strong> – the coupling strength between oscillators </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a mix of all of the oscillator signals in the group </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv427maxiAsyncKuramotoOscillator">
<span id="_CPPv327maxiAsyncKuramotoOscillator"></span><span id="_CPPv227maxiAsyncKuramotoOscillator"></span><span id="maxiAsyncKuramotoOscillator"></span><span class="target" id="classmaxiAsyncKuramotoOscillator"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiAsyncKuramotoOscillator</span></span></span><span class="w"> </span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="k"><span class="pre">public</span></span><span class="w"> </span><a class="reference internal" href="#_CPPv425maxiKuramotoOscillatorSet" title="maxiKuramotoOscillatorSet"><span class="n"><span class="pre">maxiKuramotoOscillatorSet</span></span></a><a class="headerlink" href="#_CPPv427maxiAsyncKuramotoOscillator" title="Permalink to this definition"></a><br /></dt>
<dd><p>Run a group of kuramoto oscillators with asynchronous updates. Instead of setting all of the phasors at once, you can set the phases or arbitrary individuals at abritrary times. This class updates the local oscillator according to best guesses of the phase of remote oscillators. This is useful if the other oscillators are not running on your computer, but are linked on a network. For example you could use this class for a shared network clock that is robust to timing jitter. </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N27maxiAsyncKuramotoOscillator27maxiAsyncKuramotoOscillatorEK6size_t">
<span id="_CPPv3N27maxiAsyncKuramotoOscillator27maxiAsyncKuramotoOscillatorEK6size_t"></span><span id="_CPPv2N27maxiAsyncKuramotoOscillator27maxiAsyncKuramotoOscillatorEK6size_t"></span><span id="maxiAsyncKuramotoOscillator::maxiAsyncKuramotoOscillator__sC"></span><span class="target" id="classmaxiAsyncKuramotoOscillator_1a1ce7c58885d79bedf7a77bf4d9ab1894"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiAsyncKuramotoOscillator</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">N</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N27maxiAsyncKuramotoOscillator27maxiAsyncKuramotoOscillatorEK6size_t" title="Permalink to this definition"></a><br /></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>N</strong> – the number of oscillators in the group (including this one) </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N27maxiAsyncKuramotoOscillator8setPhaseEKdK6size_t">
<span id="_CPPv3N27maxiAsyncKuramotoOscillator8setPhaseEKdK6size_t"></span><span id="_CPPv2N27maxiAsyncKuramotoOscillator8setPhaseEKdK6size_t"></span><span id="maxiAsyncKuramotoOscillator::setPhase__doubleC.sC"></span><span class="target" id="classmaxiAsyncKuramotoOscillator_1a4c5cc7f8a4c98d4480a4eec4a3ba87d0"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setPhase</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">phase</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">oscillatorIdx</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N27maxiAsyncKuramotoOscillator8setPhaseEKdK6size_t" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the phase of a single oscillator, probably in response to receiving this information over your network </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>phase</strong> – the phase, 0 - 2PI</p></li>
<li><p><strong>oscillatorIdx</strong> – the index of the oscillator </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N27maxiAsyncKuramotoOscillator9setPhasesERKNSt6vectorIdEE">
<span id="_CPPv3N27maxiAsyncKuramotoOscillator9setPhasesERKNSt6vectorIdEE"></span><span id="_CPPv2N27maxiAsyncKuramotoOscillator9setPhasesERKNSt6vectorIdEE"></span><span id="maxiAsyncKuramotoOscillator::setPhases__std::vector:double:CR"></span><span class="target" id="classmaxiAsyncKuramotoOscillator_1a8b20fb8a1d59f6884592892134e64013"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setPhases</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">std</span></span><span class="p"><span class="pre">::</span></span><span class="n"><span class="pre">vector</span></span><span class="p"><span class="pre">&lt;</span></span><span class="kt"><span class="pre">double</span></span><span class="p"><span class="pre">&gt;</span></span><span class="w"> </span><span class="p"><span class="pre">&amp;</span></span><span class="n sig-param"><span class="pre">phases</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N27maxiAsyncKuramotoOscillator9setPhasesERKNSt6vectorIdEE" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the phases of all of the oscillators</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>phases</strong> – a vector of phases (all 0 - 2PI) </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N27maxiAsyncKuramotoOscillator4playEdd">
<span id="_CPPv3N27maxiAsyncKuramotoOscillator4playEdd"></span><span id="_CPPv2N27maxiAsyncKuramotoOscillator4playEdd"></span><span id="maxiAsyncKuramotoOscillator::play__double.double"></span><span class="target" id="classmaxiAsyncKuramotoOscillator_1a3ee1b988dcbf2cfb40e58aa8b58da6ad"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">play</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">freq</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">K</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N27maxiAsyncKuramotoOscillator4playEdd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Run all of the oscillators </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>freq</strong> – the intended frequency </p></li>
<li><p><strong>K</strong> – the coupling strength between oscillators </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a mix of all of the oscillator signals in the group </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N27maxiAsyncKuramotoOscillator8getPhaseE6size_t">
<span id="_CPPv3N27maxiAsyncKuramotoOscillator8getPhaseE6size_t"></span><span id="_CPPv2N27maxiAsyncKuramotoOscillator8getPhaseE6size_t"></span><span id="maxiAsyncKuramotoOscillator::getPhase__s"></span><span class="target" id="classmaxiAsyncKuramotoOscillator_1a6b2a2e5c24008ece09c9c7ec03a975ed"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">getPhase</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">i</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N27maxiAsyncKuramotoOscillator8getPhaseE6size_t" title="Permalink to this definition"></a><br /></dt>
<dd><p>Get the phase of a single oscillator</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>i</strong> – the index of the oscillator </p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the oscillator’s phase </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N27maxiAsyncKuramotoOscillator4sizeEv">
<span id="_CPPv3N27maxiAsyncKuramotoOscillator4sizeEv"></span><span id="_CPPv2N27maxiAsyncKuramotoOscillator4sizeEv"></span><span id="maxiAsyncKuramotoOscillator::size"></span><span class="target" id="classmaxiAsyncKuramotoOscillator_1a2b890bd0d5bc44ec7a90ff43537682f3"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">size</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N27maxiAsyncKuramotoOscillator4sizeEv" title="Permalink to this definition"></a><br /></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>the number of oscillators in the group </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

</section>
<section id="filters">
<h2>Filters<a class="headerlink" href="#filters" title="Permalink to this heading"></a></h2>
<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv410maxiFilter">
<span id="_CPPv310maxiFilter"></span><span id="_CPPv210maxiFilter"></span><span id="maxiFilter"></span><span class="target" id="classmaxiFilter"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiFilter</span></span></span><a class="headerlink" href="#_CPPv410maxiFilter" title="Permalink to this definition"></a><br /></dt>
<dd><p>A selection of filters </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiFilter5loresEddd">
<span id="_CPPv3N10maxiFilter5loresEddd"></span><span id="_CPPv2N10maxiFilter5loresEddd"></span><span id="maxiFilter::lores__double.double.double"></span><span class="target" id="classmaxiFilter_1aa5547847ba00fa1018978769ea76c693"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">lores</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">input</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">cutoff1</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">resonance</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiFilter5loresEddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>A resonant low pass filter </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>input</strong> – A signal </p></li>
<li><p><strong>cutoff1</strong> – The cutoff frequency (in Hz) </p></li>
<li><p><strong>resonance</strong> – The amount of resonance </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiFilter5hiresEddd">
<span id="_CPPv3N10maxiFilter5hiresEddd"></span><span id="_CPPv2N10maxiFilter5hiresEddd"></span><span id="maxiFilter::hires__double.double.double"></span><span class="target" id="classmaxiFilter_1af673a596c353096e978f92a01d26bd2c"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">hires</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">input</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">cutoff1</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">resonance</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiFilter5hiresEddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>A resonant high pass filter </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>input</strong> – A signal </p></li>
<li><p><strong>cutoff1</strong> – The cutoff frequency (in Hz) </p></li>
<li><p><strong>resonance</strong> – The amount of resonance </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiFilter8bandpassEddd">
<span id="_CPPv3N10maxiFilter8bandpassEddd"></span><span id="_CPPv2N10maxiFilter8bandpassEddd"></span><span id="maxiFilter::bandpass__double.double.double"></span><span class="target" id="classmaxiFilter_1a5c9978649b13589cb7d9bbed581de95e"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">bandpass</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">input</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">cutoff1</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">resonance</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiFilter8bandpassEddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>A resonant band pass filter </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>input</strong> – A signal </p></li>
<li><p><strong>cutoff1</strong> – The cutoff frequency (in Hz) </p></li>
<li><p><strong>resonance</strong> – The amount of resonance </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiFilter6lopassEdd">
<span id="_CPPv3N10maxiFilter6lopassEdd"></span><span id="_CPPv2N10maxiFilter6lopassEdd"></span><span id="maxiFilter::lopass__double.double"></span><span class="target" id="classmaxiFilter_1a5eba3705e0689f0e636b418b13639be5"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">lopass</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">input</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">cutoff</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiFilter6lopassEdd" title="Permalink to this definition"></a><br /></dt>
<dd><p>A simple low pass filter </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>input</strong> – A signal </p></li>
<li><p><strong>cutoff1</strong> – The cutoff frequency (between 0 and 1) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiFilter6hipassEdd">
<span id="_CPPv3N10maxiFilter6hipassEdd"></span><span id="_CPPv2N10maxiFilter6hipassEdd"></span><span id="maxiFilter::hipass__double.double"></span><span class="target" id="classmaxiFilter_1a0a1139cb7a185a9f04f15dfad0d64ae4"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">hipass</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">input</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">cutoff</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiFilter6hipassEdd" title="Permalink to this definition"></a><br /></dt>
<dd><p>A simple low pass filter </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>input</strong> – A signal </p></li>
<li><p><strong>cutoff1</strong> – The cutoff frequency (between 0 and 1) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiFilter9setCutoffEd">
<span id="_CPPv3N10maxiFilter9setCutoffEd"></span><span id="_CPPv2N10maxiFilter9setCutoffEd"></span><span id="maxiFilter::setCutoff__double"></span><span class="target" id="classmaxiFilter_1a2ec38065db7820aa86134499aea03ef2"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setCutoff</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">cut</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiFilter9setCutoffEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>\Sets the cutoff frequency</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>cut</strong> – The cutoff frequency </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiFilter12setResonanceEd">
<span id="_CPPv3N10maxiFilter12setResonanceEd"></span><span id="_CPPv2N10maxiFilter12setResonanceEd"></span><span id="maxiFilter::setResonance__double"></span><span class="target" id="classmaxiFilter_1ac290c098758f803976092859a2a11719"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setResonance</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">res</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiFilter12setResonanceEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>\Sets the resonance</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>res</strong> – The resonance </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiFilter9getCutoffEv">
<span id="_CPPv3N10maxiFilter9getCutoffEv"></span><span id="_CPPv2N10maxiFilter9getCutoffEv"></span><span id="maxiFilter::getCutoff"></span><span class="target" id="classmaxiFilter_1ad918cf90ff35d5ff46ea75b30a692607"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">getCutoff</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiFilter9getCutoffEv" title="Permalink to this definition"></a><br /></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>the cutoff value </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiFilter12getResonanceEv">
<span id="_CPPv3N10maxiFilter12getResonanceEv"></span><span id="_CPPv2N10maxiFilter12getResonanceEv"></span><span id="maxiFilter::getResonance"></span><span class="target" id="classmaxiFilter_1a3df007f4905df3fbf93e3440ff035f47"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">getResonance</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiFilter12getResonanceEv" title="Permalink to this definition"></a><br /></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>the resonance value </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv47maxiSVF">
<span id="_CPPv37maxiSVF"></span><span id="_CPPv27maxiSVF"></span><span id="maxiSVF"></span><span class="target" id="classmaxiSVF"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiSVF</span></span></span><a class="headerlink" href="#_CPPv47maxiSVF" title="Permalink to this definition"></a><br /></dt>
<dd><p>State Variable Filter</p>
<p>algorithm from <a class="reference external" href="http://www.cytomic.com/files/dsp/SvfLinearTrapOptimised.pdf">http://www.cytomic.com/files/dsp/SvfLinearTrapOptimised.pdf</a> usage:</p>
<p>filter.setCutoff(param1); filter.setResonance(param2);</p>
<p>w = filter.play(w, 0.0, 1.0, 0.0, 0.0); </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiSVF9setCutoffEd">
<span id="_CPPv3N7maxiSVF9setCutoffEd"></span><span id="_CPPv2N7maxiSVF9setCutoffEd"></span><span id="maxiSVF::setCutoff__double"></span><span class="target" id="classmaxiSVF_1a2ef7577baa3fe7f6357f9e2ad297ca2c"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setCutoff</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">cutoff</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiSVF9setCutoffEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the cutoff frequency</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>cutoff</strong> – Cuttoff frequency (20 &lt; cutoff &lt; 20000) </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiSVF12setResonanceEd">
<span id="_CPPv3N7maxiSVF12setResonanceEd"></span><span id="_CPPv2N7maxiSVF12setResonanceEd"></span><span id="maxiSVF::setResonance__double"></span><span class="target" id="classmaxiSVF_1afd0a82425008a52ee08a8f1f53607bd8"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setResonance</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">q</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiSVF12setResonanceEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the resonance of the filter</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>q</strong> – From 0 upwards, starts to ring from 2-3ish, cracks a bit around 10 </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiSVF4playEddddd">
<span id="_CPPv3N7maxiSVF4playEddddd"></span><span id="_CPPv2N7maxiSVF4playEddddd"></span><span id="maxiSVF::play__double.double.double.double.double"></span><span class="target" id="classmaxiSVF_1a09f66ad10878865f3254b735313df947"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">play</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">w</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">lpmix</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">bpmix</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">hpmix</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">notchmix</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiSVF4playEddddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>run the filter, and get a mixture of lowpass, bandpass, highpass and notch outputs </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>w</strong> – The signal to be filtered </p></li>
<li><p><strong>lpmix</strong> – the amount of low pass filtering (0-1) </p></li>
<li><p><strong>bpmix</strong> – the amount of bandpass pass filtering (0-1) </p></li>
<li><p><strong>hpmix</strong> – the amount of high pass filtering (0-1) </p></li>
<li><p><strong>notchmix</strong> – the amount of notch filtering (0-1) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv410maxiBiquad">
<span id="_CPPv310maxiBiquad"></span><span id="_CPPv210maxiBiquad"></span><span id="maxiBiquad"></span><span class="target" id="classmaxiBiquad"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiBiquad</span></span></span><a class="headerlink" href="#_CPPv410maxiBiquad" title="Permalink to this definition"></a><br /></dt>
<dd><p>Biquad filters based on <a class="reference external" href="http://www.earlevel.com/main/2011/01/02/biquad-formulas/">http://www.earlevel.com/main/2011/01/02/biquad-formulas/</a> and <a class="reference external" href="https://ccrma.stanford.edu/~jos/fp/Direct_Form_II.html">https://ccrma.stanford.edu/~jos/fp/Direct_Form_II.html</a> </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-types">Public Types</p>
<dl class="cpp enum">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiBiquad11filterTypesE">
<span id="_CPPv3N10maxiBiquad11filterTypesE"></span><span id="_CPPv2N10maxiBiquad11filterTypesE"></span><span class="target" id="classmaxiBiquad_1afdc6a07de436e1eb9b56d07e56de98c2"></span><span class="k"><span class="pre">enum</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">filterTypes</span></span></span><a class="headerlink" href="#_CPPv4N10maxiBiquad11filterTypesE" title="Permalink to this definition"></a><br /></dt>
<dd><p>A variety of filter types </p>
<p><em>Values:</em></p>
<dl class="cpp enumerator">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiBiquad11filterTypes7LOWPASSE">
<span id="_CPPv3N10maxiBiquad11filterTypes7LOWPASSE"></span><span id="_CPPv2N10maxiBiquad11filterTypes7LOWPASSE"></span><span class="target" id="classmaxiBiquad_1afdc6a07de436e1eb9b56d07e56de98c2ab12b6b727fb8ce70410a06a721d0326a"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">LOWPASS</span></span></span><a class="headerlink" href="#_CPPv4N10maxiBiquad11filterTypes7LOWPASSE" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>

<dl class="cpp enumerator">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiBiquad11filterTypes8HIGHPASSE">
<span id="_CPPv3N10maxiBiquad11filterTypes8HIGHPASSE"></span><span id="_CPPv2N10maxiBiquad11filterTypes8HIGHPASSE"></span><span class="target" id="classmaxiBiquad_1afdc6a07de436e1eb9b56d07e56de98c2a86955103441dd37cb1f704d5e3cac234"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">HIGHPASS</span></span></span><a class="headerlink" href="#_CPPv4N10maxiBiquad11filterTypes8HIGHPASSE" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>

<dl class="cpp enumerator">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiBiquad11filterTypes8BANDPASSE">
<span id="_CPPv3N10maxiBiquad11filterTypes8BANDPASSE"></span><span id="_CPPv2N10maxiBiquad11filterTypes8BANDPASSE"></span><span class="target" id="classmaxiBiquad_1afdc6a07de436e1eb9b56d07e56de98c2a60625ec3a18e510b032d5a2bd072ae99"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">BANDPASS</span></span></span><a class="headerlink" href="#_CPPv4N10maxiBiquad11filterTypes8BANDPASSE" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>

<dl class="cpp enumerator">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiBiquad11filterTypes5NOTCHE">
<span id="_CPPv3N10maxiBiquad11filterTypes5NOTCHE"></span><span id="_CPPv2N10maxiBiquad11filterTypes5NOTCHE"></span><span class="target" id="classmaxiBiquad_1afdc6a07de436e1eb9b56d07e56de98c2a50f53f0e198cdedd044144d4097e3e29"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">NOTCH</span></span></span><a class="headerlink" href="#_CPPv4N10maxiBiquad11filterTypes5NOTCHE" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>

<dl class="cpp enumerator">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiBiquad11filterTypes4PEAKE">
<span id="_CPPv3N10maxiBiquad11filterTypes4PEAKE"></span><span id="_CPPv2N10maxiBiquad11filterTypes4PEAKE"></span><span class="target" id="classmaxiBiquad_1afdc6a07de436e1eb9b56d07e56de98c2a97ccbd1a53a437d1b3ca46cd07b5e850"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">PEAK</span></span></span><a class="headerlink" href="#_CPPv4N10maxiBiquad11filterTypes4PEAKE" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>

<dl class="cpp enumerator">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiBiquad11filterTypes8LOWSHELFE">
<span id="_CPPv3N10maxiBiquad11filterTypes8LOWSHELFE"></span><span id="_CPPv2N10maxiBiquad11filterTypes8LOWSHELFE"></span><span class="target" id="classmaxiBiquad_1afdc6a07de436e1eb9b56d07e56de98c2a370fb7faddd90af12dbdd8dc152e1478"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">LOWSHELF</span></span></span><a class="headerlink" href="#_CPPv4N10maxiBiquad11filterTypes8LOWSHELFE" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>

<dl class="cpp enumerator">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiBiquad11filterTypes9HIGHSHELFE">
<span id="_CPPv3N10maxiBiquad11filterTypes9HIGHSHELFE"></span><span id="_CPPv2N10maxiBiquad11filterTypes9HIGHSHELFE"></span><span class="target" id="classmaxiBiquad_1afdc6a07de436e1eb9b56d07e56de98c2abbf497f0dd07907392446d2bdaffbfdf"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">HIGHSHELF</span></span></span><a class="headerlink" href="#_CPPv4N10maxiBiquad11filterTypes9HIGHSHELFE" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>

</dd></dl>

</div>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiBiquad4playEd">
<span id="_CPPv3N10maxiBiquad4playEd"></span><span id="_CPPv2N10maxiBiquad4playEd"></span><span id="maxiBiquad::play__double"></span><span class="target" id="classmaxiBiquad_1ac601f5a099d4517a1e9eac04f9ebd371"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">play</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">input</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiBiquad4playEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Process a signal through the filter</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>input</strong> – A signal </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiBiquad3setE11filterTypesddd">
<span id="_CPPv3N10maxiBiquad3setE11filterTypesddd"></span><span id="_CPPv2N10maxiBiquad3setE11filterTypesddd"></span><span id="maxiBiquad::set__filterTypes.double.double.double"></span><span class="target" id="classmaxiBiquad_1a2e86cf2367c1b6fc1e089cf324c7ff6f"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">set</span></span></span><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv4N10maxiBiquad11filterTypesE" title="maxiBiquad::filterTypes"><span class="n"><span class="pre">filterTypes</span></span></a><span class="w"> </span><span class="n sig-param"><span class="pre">filtType</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">cutoff</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">Q</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">peakGain</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiBiquad3setE11filterTypesddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Configure the filter </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>filtType</strong> – The type of filter, set from <a class="reference internal" href="#classmaxiBiquad_1afdc6a07de436e1eb9b56d07e56de98c2"><span class="std std-ref">maxiBiquad::filterTypes</span></a> </p></li>
<li><p><strong>cutoff</strong> – The filter cutoff frequency in Hz </p></li>
<li><p><strong>Q</strong> – The resonance of the filter </p></li>
<li><p><strong>peakGain</strong> – The gain of the filter (only used for PEAK, HIGHSHELF and LOWSHELF) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv413maxiDCBlocker">
<span id="_CPPv313maxiDCBlocker"></span><span id="_CPPv213maxiDCBlocker"></span><span id="maxiDCBlocker"></span><span class="target" id="classmaxiDCBlocker"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiDCBlocker</span></span></span><a class="headerlink" href="#_CPPv413maxiDCBlocker" title="Permalink to this definition"></a><br /></dt>
<dd><p>A simple high pass filter to block DC </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N13maxiDCBlocker4playEdd">
<span id="_CPPv3N13maxiDCBlocker4playEdd"></span><span id="_CPPv2N13maxiDCBlocker4playEdd"></span><span id="maxiDCBlocker::play__double.double"></span><span class="target" id="classmaxiDCBlocker_1a2dc9eb8772f131e4161c157d5f8cdeb7"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">play</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">input</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">R</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N13maxiDCBlocker4playEdd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Remove DC from a signal</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>input</strong> – a signal</p></li>
<li><p><strong>R</strong> – the sensitivity (0-1) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

</section>
<section id="dynamics">
<h2>Dynamics<a class="headerlink" href="#dynamics" title="Permalink to this heading"></a></h2>
<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv412maxiDynamics">
<span id="_CPPv312maxiDynamics"></span><span id="_CPPv212maxiDynamics"></span><span id="maxiDynamics"></span><span class="target" id="classmaxiDynamics"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiDynamics</span></span></span><a class="headerlink" href="#_CPPv412maxiDynamics" title="Permalink to this definition"></a><br /></dt>
<dd><p>The class provides a range of dynamics processing: downward and upward compression, downward and upward expansion, sidechaining, attack and release, lookahead and peak or RMS detection </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiDynamics4playEdddddddd">
<span id="_CPPv3N12maxiDynamics4playEdddddddd"></span><span id="_CPPv2N12maxiDynamics4playEdddddddd"></span><span id="maxiDynamics::play__double.double.double.double.double.double.double.double"></span><span class="target" id="classmaxiDynamics_1a79a4f30d45aabb964405fde5aaa6829c"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">play</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">sig</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">control</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">thresholdHigh</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">ratioHigh</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">kneeHigh</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">thresholdLow</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">ratioLow</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">kneeLow</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiDynamics4playEdddddddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>This functions compands the signal, providing download compression or upward expansion above an upper thresold, and upward compression or downward expansion below a lower threshold. </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>sig</strong> – The input signal to be companded </p></li>
<li><p><strong>control</strong> – This signal is used to trigger the compander. Use it for sidechaining, or if no sidechain is needed, use the same signal for this and the input signal </p></li>
<li><p><strong>thresholdHigh</strong> – The high threshold, in Dbs </p></li>
<li><p><strong>ratioHigh</strong> – The ratio for companding above the high threshold </p></li>
<li><p><strong>kneeHigh</strong> – The size of the knee for companding above the high threshold (in Dbs) </p></li>
<li><p><strong>thresholdLow</strong> – The low threshold, in Dbs </p></li>
<li><p><strong>ratioLow</strong> – The ratio for companding below the low threshold </p></li>
<li><p><strong>kneeLow</strong> – The size of the knee for companding below the low threshold (in Dbs) </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a companded signal </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiDynamics8compressEdddd">
<span id="_CPPv3N12maxiDynamics8compressEdddd"></span><span id="_CPPv2N12maxiDynamics8compressEdddd"></span><span id="maxiDynamics::compress__double.double.double.double"></span><span class="target" id="classmaxiDynamics_1a14785d18672ec3c94481e1bd8bc6ed7d"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">compress</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">sig</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">threshold</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">ratio</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">knee</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiDynamics8compressEdddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Compress a signal (using downward compression) </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>sig</strong> – The input signal to be compressed </p></li>
<li><p><strong>threshold</strong> – The threshold, in Dbs </p></li>
<li><p><strong>ratio</strong> – The compression ratio (&gt;1 provides compression, &lt;1 provides expansion) </p></li>
<li><p><strong>knee</strong> – The size of the knee (in Dbs) </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a compressed signal </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiDynamics17sidechainCompressEddddd">
<span id="_CPPv3N12maxiDynamics17sidechainCompressEddddd"></span><span id="_CPPv2N12maxiDynamics17sidechainCompressEddddd"></span><span id="maxiDynamics::sidechainCompress__double.double.double.double.double"></span><span class="target" id="classmaxiDynamics_1a37af4d24f186e53efbad57903a028056"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">sidechainCompress</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">sig</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">control</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">threshold</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">ratio</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">knee</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiDynamics17sidechainCompressEddddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Compress a signal with sidechaining (using downward compression) </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>sig</strong> – The input signal to be compressed </p></li>
<li><p><strong>control</strong> – The sidechain signal </p></li>
<li><p><strong>threshold</strong> – The threshold, in Dbs </p></li>
<li><p><strong>ratio</strong> – The compression ratio (&gt;1 provides compression, &lt;1 provides expansion) </p></li>
<li><p><strong>knee</strong> – The size of the knee (in Dbs) </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a compressed signal </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiDynamics12compandAboveEddddd">
<span id="_CPPv3N12maxiDynamics12compandAboveEddddd"></span><span id="_CPPv2N12maxiDynamics12compandAboveEddddd"></span><span id="maxiDynamics::compandAbove__double.double.double.double.double"></span><span class="target" id="classmaxiDynamics_1a3512c121bbf43b379205616ec07e6584"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">compandAbove</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">sig</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">control</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">threshold</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">ratio</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">knee</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiDynamics12compandAboveEddddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Compand a signal, using detection above a threshold (provides downward compression or upward expansion) </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>sig</strong> – The input signal to be compressed </p></li>
<li><p><strong>control</strong> – The sidechain signal </p></li>
<li><p><strong>threshold</strong> – The threshold, in Dbs </p></li>
<li><p><strong>ratio</strong> – The compression ratio (&gt;1 provides compression, &lt;1 provides expansion) </p></li>
<li><p><strong>knee</strong> – The size of the knee (in Dbs) </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a companded signal </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiDynamics12compandBelowEddddd">
<span id="_CPPv3N12maxiDynamics12compandBelowEddddd"></span><span id="_CPPv2N12maxiDynamics12compandBelowEddddd"></span><span id="maxiDynamics::compandBelow__double.double.double.double.double"></span><span class="target" id="classmaxiDynamics_1a14133dec6e29ea14f8b1e96dbe8aadec"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">compandBelow</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">sig</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">control</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">threshold</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">ratio</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">knee</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiDynamics12compandBelowEddddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Compand a signal, using detection below a threshold (provides upward compression or downward expansion) </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>sig</strong> – The input signal to be compressed </p></li>
<li><p><strong>control</strong> – The sidechain signal </p></li>
<li><p><strong>threshold</strong> – The threshold, in Dbs </p></li>
<li><p><strong>ratio</strong> – The compression ratio (&gt;1 provides compression, &lt;1 provides expansion) </p></li>
<li><p><strong>knee</strong> – The size of the knee (in Dbs) </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a companded signal </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiDynamics13setAttackHighEd">
<span id="_CPPv3N12maxiDynamics13setAttackHighEd"></span><span id="_CPPv2N12maxiDynamics13setAttackHighEd"></span><span id="maxiDynamics::setAttackHigh__double"></span><span class="target" id="classmaxiDynamics_1a0273d2650b89b9479a4f2edc6c6199fe"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setAttackHigh</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">attack</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiDynamics13setAttackHighEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the attack time for the high threshold. This is the amount of time over which the ratio moves from 1 to its full value, following the input analyser going over the threshold. </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>attack</strong> – The attack time (in milliseconds) </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiDynamics14setReleaseHighEd">
<span id="_CPPv3N12maxiDynamics14setReleaseHighEd"></span><span id="_CPPv2N12maxiDynamics14setReleaseHighEd"></span><span id="maxiDynamics::setReleaseHigh__double"></span><span class="target" id="classmaxiDynamics_1a404880950607546bc14b42841114a658"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setReleaseHigh</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">release</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiDynamics14setReleaseHighEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the release time for the high threshold. This is the amount of time over which the ratio moves from its full value to 1, following the input analyser going under the threshold. </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>release</strong> – The release time (in milliseconds) </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiDynamics12setAttackLowEd">
<span id="_CPPv3N12maxiDynamics12setAttackLowEd"></span><span id="_CPPv2N12maxiDynamics12setAttackLowEd"></span><span id="maxiDynamics::setAttackLow__double"></span><span class="target" id="classmaxiDynamics_1aa76adf63dbc2787b4b371ec5004a046d"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setAttackLow</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">attack</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiDynamics12setAttackLowEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the attack time for the low threshold. This is the amount of time over which the ratio moves from 1 to its full value, following the input analyser going under the threshold. </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>attack</strong> – The attack time (in milliseconds) </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiDynamics13setReleaseLowEd">
<span id="_CPPv3N12maxiDynamics13setReleaseLowEd"></span><span id="_CPPv2N12maxiDynamics13setReleaseLowEd"></span><span id="maxiDynamics::setReleaseLow__double"></span><span class="target" id="classmaxiDynamics_1a3a12966b1242cd305e1ae1f469ec8b73"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setReleaseLow</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">release</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiDynamics13setReleaseLowEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the release time for the low threshold. This is the amount of time over which the ratio moves from its full value to 1, following the input analyser going over the threshold. </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>release</strong> – The release time (in milliseconds) </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiDynamics12setLookAheadEd">
<span id="_CPPv3N12maxiDynamics12setLookAheadEd"></span><span id="_CPPv2N12maxiDynamics12setLookAheadEd"></span><span id="maxiDynamics::setLookAhead__double"></span><span class="target" id="classmaxiDynamics_1a82b54fa78fd19796049ebe33f798b4c2"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setLookAhead</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">length</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiDynamics12setLookAheadEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>The look ahead creates a delay on the input signal, meaning that that the signal is compressed according to event that have already happened in the control signal. This can be useful for limiting and catching fast transients. </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>length</strong> – The amount of time the compressor looks ahead (in milliseconds) </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiDynamics12getLookAheadEv">
<span id="_CPPv3N12maxiDynamics12getLookAheadEv"></span><span id="_CPPv2N12maxiDynamics12getLookAheadEv"></span><span id="maxiDynamics::getLookAhead"></span><span class="target" id="classmaxiDynamics_1a120d14fe57e3174e02ba9983c4f605a0"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">getLookAhead</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiDynamics12getLookAheadEv" title="Permalink to this definition"></a><br /></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>the look ahead time (in milliseconds) </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiDynamics16setRMSWindowSizeEd">
<span id="_CPPv3N12maxiDynamics16setRMSWindowSizeEd"></span><span id="_CPPv2N12maxiDynamics16setRMSWindowSizeEd"></span><span id="maxiDynamics::setRMSWindowSize__double"></span><span class="target" id="classmaxiDynamics_1afa1ab43b86ed583064a4d09fc2fcc56f"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setRMSWindowSize</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">winSize</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiDynamics16setRMSWindowSizeEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the size of the RMS window. Longer times give a slower response </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>winSize</strong> – The size of the window (in milliseconds) </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiDynamics16setInputAnalyserE9ANALYSERS">
<span id="_CPPv3N12maxiDynamics16setInputAnalyserE9ANALYSERS"></span><span id="_CPPv2N12maxiDynamics16setInputAnalyserE9ANALYSERS"></span><span id="maxiDynamics::setInputAnalyser__ANALYSERS"></span><span class="target" id="classmaxiDynamics_1a90493175c8e190322d1da6ca20f3403c"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setInputAnalyser</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">ANALYSERS</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">mode</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiDynamics16setInputAnalyserE9ANALYSERS" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the method by which the compressor analyses the control input \mode maxiDynamics::PEAK for peak analysis, maxiDynamics::RMS for rms analysis </p>
</dd></dl>

</div>
</dd></dl>

</section>
<section id="effects">
<h2>Effects<a class="headerlink" href="#effects" title="Permalink to this heading"></a></h2>
<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv413maxiDelayline">
<span id="_CPPv313maxiDelayline"></span><span id="_CPPv213maxiDelayline"></span><span id="maxiDelayline"></span><span class="target" id="classmaxiDelayline"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiDelayline</span></span></span><a class="headerlink" href="#_CPPv413maxiDelayline" title="Permalink to this definition"></a><br /></dt>
<dd><div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N13maxiDelayline2dlEdid">
<span id="_CPPv3N13maxiDelayline2dlEdid"></span><span id="_CPPv2N13maxiDelayline2dlEdid"></span><span id="maxiDelayline::dl__double.i.double"></span><span class="target" id="classmaxiDelayline_1a262f9a52fc6d7c087caaae350779f956"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">dl</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">input</span></span>, <span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">size</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">feedback</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N13maxiDelayline2dlEdid" title="Permalink to this definition"></a><br /></dt>
<dd><p>Apply a delay to a signal</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>input</strong> – a signal,</p></li>
<li><p><strong>size</strong> – the size of the delay in samples</p></li>
<li><p><strong>feedback</strong> – the amount of feedback </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N13maxiDelayline14dlFromPositionEdidi">
<span id="_CPPv3N13maxiDelayline14dlFromPositionEdidi"></span><span id="_CPPv2N13maxiDelayline14dlFromPositionEdidi"></span><span id="maxiDelayline::dlFromPosition__double.i.double.i"></span><span class="target" id="classmaxiDelayline_1a8db792dd66742c0b91567efffd2fb09e"></span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">dlFromPosition</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">input</span></span>, <span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">size</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">feedback</span></span>, <span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">position</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N13maxiDelayline14dlFromPositionEdidi" title="Permalink to this definition"></a><br /></dt>
<dd><p>Apply a delay to a signal, reading from a specific position in the buffer </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>input</strong> – a signal,</p></li>
<li><p><strong>size</strong> – the size of the delay in samples</p></li>
<li><p><strong>feedback</strong> – the amount of feedback </p></li>
<li><p><strong>position</strong> – the position in the buffer (in samples) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv416maxiNonlinearity">
<span id="_CPPv316maxiNonlinearity"></span><span id="_CPPv216maxiNonlinearity"></span><span id="maxiNonlinearity"></span><span class="target" id="classmaxiNonlinearity"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiNonlinearity</span></span></span><a class="headerlink" href="#_CPPv416maxiNonlinearity" title="Permalink to this definition"></a><br /></dt>
<dd><p>Various ways to distort signals </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N16maxiNonlinearity8atanDistEKdKd">
<span id="_CPPv3N16maxiNonlinearity8atanDistEKdKd"></span><span id="_CPPv2N16maxiNonlinearity8atanDistEKdKd"></span><span id="maxiNonlinearity::atanDist__doubleC.doubleC"></span><span class="target" id="classmaxiNonlinearity_1a7768ef4e151832457efe388109ff8145"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">atanDist</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">in</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">shape</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N16maxiNonlinearity8atanDistEKdKd" title="Permalink to this definition"></a><br /></dt>
<dd><p>atan distortion, see <a class="reference external" href="http://www.musicdsp.org/showArchiveComment.php?ArchiveID=104">http://www.musicdsp.org/showArchiveComment.php?ArchiveID=104</a> </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>in</strong> – A signal </p></li>
<li><p><strong>shape</strong> – from 1 (soft clipping) to infinity (hard clipping) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N16maxiNonlinearity12fastAtanDistEKdKd">
<span id="_CPPv3N16maxiNonlinearity12fastAtanDistEKdKd"></span><span id="_CPPv2N16maxiNonlinearity12fastAtanDistEKdKd"></span><span id="maxiNonlinearity::fastAtanDist__doubleC.doubleC"></span><span class="target" id="classmaxiNonlinearity_1a7925d5eeeac8953db220c2ed121b323e"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">fastAtanDist</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">in</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">shape</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N16maxiNonlinearity12fastAtanDistEKdKd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Faster but ‘lower quality’ version of atan distortion </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>in</strong> – A signal </p></li>
<li><p><strong>shape</strong> – from 1 (soft clipping) to infinity (hard clipping) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N16maxiNonlinearity8softclipEd">
<span id="_CPPv3N16maxiNonlinearity8softclipEd"></span><span id="_CPPv2N16maxiNonlinearity8softclipEd"></span><span id="maxiNonlinearity::softclip__double"></span><span class="target" id="classmaxiNonlinearity_1af31dae57b366bf898eaee24f06d146f6"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">softclip</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">x</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N16maxiNonlinearity8softclipEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Cliping with nicer harmonics</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>x</strong> – A signal </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N16maxiNonlinearity8hardclipEd">
<span id="_CPPv3N16maxiNonlinearity8hardclipEd"></span><span id="_CPPv2N16maxiNonlinearity8hardclipEd"></span><span id="maxiNonlinearity::hardclip__double"></span><span class="target" id="classmaxiNonlinearity_1ad256eefc5e3cfbe70ad22cf105e187cc"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">hardclip</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">x</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N16maxiNonlinearity8hardclipEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Cliping with nastier harmonics</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>x</strong> – A signal </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N16maxiNonlinearity8asymclipEddd">
<span id="_CPPv3N16maxiNonlinearity8asymclipEddd"></span><span id="_CPPv2N16maxiNonlinearity8asymclipEddd"></span><span id="maxiNonlinearity::asymclip__double.double.double"></span><span class="target" id="classmaxiNonlinearity_1aa8e54b18b54b7dca2f0bfb0171e038cd"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">asymclip</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">x</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">a</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">b</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N16maxiNonlinearity8asymclipEddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>asymmetric clipping: chose the shape of curves for both positive and negative values of x try it here <a class="reference external" href="https://www.desmos.com/calculator/to6eixatsa">https://www.desmos.com/calculator/to6eixatsa</a> </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>x</strong> – A signal </p></li>
<li><p><strong>a</strong> – Exponent for the positive curve </p></li>
<li><p><strong>b</strong> – Exponent for the negative curve </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N16maxiNonlinearity8fastatanEd">
<span id="_CPPv3N16maxiNonlinearity8fastatanEd"></span><span id="_CPPv2N16maxiNonlinearity8fastatanEd"></span><span id="maxiNonlinearity::fastatan__double"></span><span class="target" id="classmaxiNonlinearity_1a010c469f179b4bbca35755219063b217"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">fastatan</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">x</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N16maxiNonlinearity8fastatanEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Fast atan distortion</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>x</strong> – A signal </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv417maxiSampleAndHold">
<span id="_CPPv317maxiSampleAndHold"></span><span id="_CPPv217maxiSampleAndHold"></span><span id="maxiSampleAndHold"></span><span class="target" id="classmaxiSampleAndHold"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiSampleAndHold</span></span></span><a class="headerlink" href="#_CPPv417maxiSampleAndHold" title="Permalink to this definition"></a><br /></dt>
<dd><p>Sample and hold effect: samples the input signal periodically and outputs that value </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N17maxiSampleAndHold3sahEdd">
<span id="_CPPv3N17maxiSampleAndHold3sahEdd"></span><span id="_CPPv2N17maxiSampleAndHold3sahEdd"></span><span id="maxiSampleAndHold::sah__double.double"></span><span class="target" id="classmaxiSampleAndHold_1a5271ce0f72e21dc33469cd73abf5985f"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">sah</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">sigIn</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">holdTimeMs</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N17maxiSampleAndHold3sahEdd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Process a signal</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>sigIn</strong> – a signal</p></li>
<li><p><strong>holdTimeMs</strong> – The length of the sampling period </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the sampled signal </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv410maxiChorus">
<span id="_CPPv310maxiChorus"></span><span id="_CPPv210maxiChorus"></span><span id="maxiChorus"></span><span class="target" id="classmaxiChorus"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiChorus</span></span></span><a class="headerlink" href="#_CPPv410maxiChorus" title="Permalink to this definition"></a><br /></dt>
<dd><p>A chorus effect </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N10maxiChorus6chorusEKdKjKdKdKd">
<span id="_CPPv3N10maxiChorus6chorusEKdKjKdKdKd"></span><span id="_CPPv2N10maxiChorus6chorusEKdKjKdKdKd"></span><span id="maxiChorus::chorus__doubleC.unsigned-iC.doubleC.doubleC.doubleC"></span><span class="target" id="classmaxiChorus_1ae6b12ddc4d9bbe3eebc5ac5825fd86a2"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">chorus</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">input</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">unsigned</span></span><span class="w"> </span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">delay</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">feedback</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">speed</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">depth</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N10maxiChorus6chorusEKdKjKdKdKd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Apply a chorus effect to a signal </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>input</strong> – a signal </p></li>
<li><p><strong>delay</strong> – the amount of delay (in milliseconds, recommended 1-1000) </p></li>
<li><p><strong>feedback</strong> – the amount of feedback, 0-1 </p></li>
<li><p><strong>speed</strong> – the speed of the chorus, in Hz </p></li>
<li><p><strong>depth</strong> – the depth of the chorus effect, 0-1 </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the input signal with chorus applied </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv411maxiFlanger">
<span id="_CPPv311maxiFlanger"></span><span id="_CPPv211maxiFlanger"></span><span id="maxiFlanger"></span><span class="target" id="classmaxiFlanger"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiFlanger</span></span></span><a class="headerlink" href="#_CPPv411maxiFlanger" title="Permalink to this definition"></a><br /></dt>
<dd><p>A flanger effect </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N11maxiFlanger6flangeEKdKjKdKdKd">
<span id="_CPPv3N11maxiFlanger6flangeEKdKjKdKdKd"></span><span id="_CPPv2N11maxiFlanger6flangeEKdKjKdKdKd"></span><span id="maxiFlanger::flange__doubleC.unsigned-iC.doubleC.doubleC.doubleC"></span><span class="target" id="classmaxiFlanger_1abb001b4066237c99e69c983b638d4943"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">flange</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">input</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">unsigned</span></span><span class="w"> </span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">delay</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">feedback</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">speed</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">depth</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N11maxiFlanger6flangeEKdKjKdKdKd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Apply a flanger effect to a signal </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>input</strong> – a signal </p></li>
<li><p><strong>delay</strong> – the amount of delay (in milliseconds, recommended 1-1000) </p></li>
<li><p><strong>feedback</strong> – the amount of feedback, 0-1 </p></li>
<li><p><strong>speed</strong> – the speed of the flanger LFO, in Hz </p></li>
<li><p><strong>depth</strong> – the depth of the LFO, 0-1 </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the input signal, flanged </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

</section>
<section id="analysis">
<h2>Analysis<a class="headerlink" href="#analysis" title="Permalink to this heading"></a></h2>
<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv424maxiZeroCrossingDetector">
<span id="_CPPv324maxiZeroCrossingDetector"></span><span id="_CPPv224maxiZeroCrossingDetector"></span><span id="maxiZeroCrossingDetector"></span><span class="target" id="classmaxiZeroCrossingDetector"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiZeroCrossingDetector</span></span></span><a class="headerlink" href="#_CPPv424maxiZeroCrossingDetector" title="Permalink to this definition"></a><br /></dt>
<dd><p>Detect positive zero-crossings: the point in time when a signal transitions from 0 or less, to above zero </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N24maxiZeroCrossingDetector2zxEd">
<span id="_CPPv3N24maxiZeroCrossingDetector2zxEd"></span><span id="_CPPv2N24maxiZeroCrossingDetector2zxEd"></span><span id="maxiZeroCrossingDetector::zx__double"></span><span class="target" id="classmaxiZeroCrossingDetector_1aa7910490989a6a12655ee083fece2eeb"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">zx</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">x</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N24maxiZeroCrossingDetector2zxEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Returns true when a positive zero-crossing occurs, othersize false</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>x</strong> – A signal </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv420maxiZeroCrossingRate">
<span id="_CPPv320maxiZeroCrossingRate"></span><span id="_CPPv220maxiZeroCrossingRate"></span><span id="maxiZeroCrossingRate"></span><span class="target" id="classmaxiZeroCrossingRate"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiZeroCrossingRate</span></span></span><a class="headerlink" href="#_CPPv420maxiZeroCrossingRate" title="Permalink to this definition"></a><br /></dt>
<dd><p>Calculate the zero crossing rate of a signal This is a fairly crude measure of frequency, which is confounded by complex waveforms and noise </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N20maxiZeroCrossingRate4playEd">
<span id="_CPPv3N20maxiZeroCrossingRate4playEd"></span><span id="_CPPv2N20maxiZeroCrossingRate4playEd"></span><span id="maxiZeroCrossingRate::play__double"></span><span class="target" id="classmaxiZeroCrossingRate_1a0d64e5805124f957b1c9c8b19024d477"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">play</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">signal</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N20maxiZeroCrossingRate4playEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Calculate the zero cross rate</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>signal</strong> – a signal </p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the zero crossing rate in Hz </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv47maxiRMS">
<span id="_CPPv37maxiRMS"></span><span id="_CPPv27maxiRMS"></span><span id="maxiRMS"></span><span class="target" id="classmaxiRMS"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiRMS</span></span></span><a class="headerlink" href="#_CPPv47maxiRMS" title="Permalink to this definition"></a><br /></dt>
<dd><p>Calculate the Root Mean Square of a signal over a window of time This is a good measurement of the amount of power in a signal </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiRMS5setupEdd">
<span id="_CPPv3N7maxiRMS5setupEdd"></span><span id="_CPPv2N7maxiRMS5setupEdd"></span><span id="maxiRMS::setup__double.double"></span><span class="target" id="classmaxiRMS_1a83f8273f50317de69ddd4ee85643126b"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setup</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">maxLength</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">windowSize</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiRMS5setupEdd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Configure the analyser</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>maxLength</strong> – The maximum length of time to analyse (ms)</p></li>
<li><p><strong>windowSize</strong> – The size of the window of time to analyse initially (ms, &lt;= maxLength) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiRMS13setWindowSizeEd">
<span id="_CPPv3N7maxiRMS13setWindowSizeEd"></span><span id="_CPPv2N7maxiRMS13setWindowSizeEd"></span><span id="maxiRMS::setWindowSize__double"></span><span class="target" id="classmaxiRMS_1acb19557702eae3155ae190e1519c8fe6"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setWindowSize</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">newWindowSize</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiRMS13setWindowSizeEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Set the size of the analysis window</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>newWindowSize</strong> – the size of the analysis window (in ms). Large values will smooth out the measurement, and make it less responsive to transients </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiRMS13getWindowSizeEv">
<span id="_CPPv3N7maxiRMS13getWindowSizeEv"></span><span id="_CPPv2N7maxiRMS13getWindowSizeEv"></span><span id="maxiRMS::getWindowSize"></span><span class="target" id="classmaxiRMS_1ab262cc704a1720a34b5aba4553bf905e"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">getWindowSize</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiRMS13getWindowSizeEv" title="Permalink to this definition"></a><br /></dt>
<dd><p>Find out the size of the analysis window (in ms) </p>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv411maxiTrigger">
<span id="_CPPv311maxiTrigger"></span><span id="_CPPv211maxiTrigger"></span><span id="maxiTrigger"></span><span class="target" id="classmaxiTrigger"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiTrigger</span></span></span><a class="headerlink" href="#_CPPv411maxiTrigger" title="Permalink to this definition"></a><br /></dt>
<dd><p>Generator triggers (a single 1 in a stream of 0s) according to certain conditions </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N11maxiTrigger4onZXEd">
<span id="_CPPv3N11maxiTrigger4onZXEd"></span><span id="_CPPv2N11maxiTrigger4onZXEd"></span><span id="maxiTrigger::onZX__double"></span><span class="target" id="classmaxiTrigger_1a0698eef58cbfc97a42ab20dbb88a2a50"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">onZX</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">input</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N11maxiTrigger4onZXEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Generate a trigger when a signal transitions from &lt;=0 to above 0</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>input</strong> – A signal </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N11maxiTrigger9onChangedEdd">
<span id="_CPPv3N11maxiTrigger9onChangedEdd"></span><span id="_CPPv2N11maxiTrigger9onChangedEdd"></span><span id="maxiTrigger::onChanged__double.double"></span><span class="target" id="classmaxiTrigger_1a443b416d526c83c3a36280704050f1d9"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">onChanged</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">input</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">tolerance</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N11maxiTrigger9onChangedEdd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Generate a trigger when a signal changes beyond a certain amount</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>input</strong> – A signal</p></li>
<li><p><strong>tolerance</strong> – The amount of chance allowed before a trigger is generated </p></li>
</ul>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

</section>
<section id="sequencing">
<h2>Sequencing<a class="headerlink" href="#sequencing" title="Permalink to this heading"></a></h2>
<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv48maxiStep">
<span id="_CPPv38maxiStep"></span><span id="_CPPv28maxiStep"></span><span id="maxiStep"></span><span class="target" id="classmaxiStep"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiStep</span></span></span><a class="headerlink" href="#_CPPv48maxiStep" title="Permalink to this definition"></a><br /></dt>
<dd><p>Pull sequential values from an array </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N8maxiStep4pullEKd11DOUBLEARRAYd">
<span id="_CPPv3N8maxiStep4pullEKd11DOUBLEARRAYd"></span><span id="_CPPv2N8maxiStep4pullEKd11DOUBLEARRAYd"></span><span id="maxiStep::pull__doubleC.DOUBLEARRAY.double"></span><span class="target" id="classmaxiStep_1a86b0a93a6367bf5cce8f653368538341"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">pull</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">trigSig</span></span>, <span class="n"><span class="pre">DOUBLEARRAY</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">values</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">step</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N8maxiStep4pullEKd11DOUBLEARRAYd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Take values from the array when triggered </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>trigSig</strong> – A signal to trigger a new value on a positive zero crossing </p></li>
<li><p><strong>values</strong> – An array of values </p></li>
<li><p><strong>step</strong> – The amount that the array index should increase after pulling a new value. This wraps around to zero at the end of the array </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N8maxiStep8getIndexEv">
<span id="_CPPv3N8maxiStep8getIndexEv"></span><span id="_CPPv2N8maxiStep8getIndexEv"></span><span id="maxiStep::getIndex"></span><span class="target" id="classmaxiStep_1a8b790d681ec903dd8b432d7fc0bb3427"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">getIndex</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N8maxiStep8getIndexEv" title="Permalink to this definition"></a><br /></dt>
<dd><p>Get the current array index </p>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv411maxiCounter">
<span id="_CPPv311maxiCounter"></span><span id="_CPPv211maxiCounter"></span><span id="maxiCounter"></span><span class="target" id="classmaxiCounter"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiCounter</span></span></span><a class="headerlink" href="#_CPPv411maxiCounter" title="Permalink to this definition"></a><br /></dt>
<dd><p>Count triggers </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N11maxiCounter5countEdd">
<span id="_CPPv3N11maxiCounter5countEdd"></span><span id="_CPPv2N11maxiCounter5countEdd"></span><span id="maxiCounter::count__double.double"></span><span class="target" id="classmaxiCounter_1aec77792df4bbae4a7b40a5e536936b01"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">count</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">incTrigger</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">resetTrigger</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N11maxiCounter5countEdd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Increase each time a trigger is received </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>incTrigger</strong> – a signal that triggers the counter to increment </p></li>
<li><p><strong>resetTrigger</strong> – a signal that resets the counter to zero </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the number of triggers received since the beginning or the last reset </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv413maxiZXToPulse">
<span id="_CPPv313maxiZXToPulse"></span><span id="_CPPv213maxiZXToPulse"></span><span id="maxiZXToPulse"></span><span class="target" id="classmaxiZXToPulse"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiZXToPulse</span></span></span><a class="headerlink" href="#_CPPv413maxiZXToPulse" title="Permalink to this definition"></a><br /></dt>
<dd><p>Extend a trigger into a pulse. This is useful for making basic gates in sequences. Use <a class="reference internal" href="#classmaxiEnvGen"><span class="std std-ref">maxiEnvGen</span></a> for more advanced gate and envelope generation. </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N13maxiZXToPulse4playEdd">
<span id="_CPPv3N13maxiZXToPulse4playEdd"></span><span id="_CPPv2N13maxiZXToPulse4playEdd"></span><span id="maxiZXToPulse::play__double.double"></span><span class="target" id="classmaxiZXToPulse_1a4a1b68937cfe604af94c61682a7abf20"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">play</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">input</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">holdTimeInSamples</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N13maxiZXToPulse4playEdd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Extend a trigger into a pulse. </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>input</strong> – a signal </p></li>
<li><p><strong>holdTimeInSamples</strong> – the length of the pulse in samples (use <a class="reference internal" href="#classmaxiConvert"><span class="std std-ref">maxiConvert</span></a> to get this value from milliseconds) </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a pulse, triggered by a zero crossing in the input </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv412maxiRatioSeq">
<span id="_CPPv312maxiRatioSeq"></span><span id="_CPPv212maxiRatioSeq"></span><span id="maxiRatioSeq"></span><span class="target" id="classmaxiRatioSeq"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiRatioSeq</span></span></span><a class="headerlink" href="#_CPPv412maxiRatioSeq" title="Permalink to this definition"></a><br /></dt>
<dd><p>Sequence triggers and numbers, using a list of modulateable ratios to control timing. </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiRatioSeq8playTrigEd11DOUBLEARRAY">
<span id="_CPPv3N12maxiRatioSeq8playTrigEd11DOUBLEARRAY"></span><span id="_CPPv2N12maxiRatioSeq8playTrigEd11DOUBLEARRAY"></span><span id="maxiRatioSeq::playTrig__double.DOUBLEARRAY"></span><span class="target" id="classmaxiRatioSeq_1a507ce4732d83f6ed512e1797b03c6483"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">playTrig</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">phase</span></span>, <span class="n"><span class="pre">DOUBLEARRAY</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">times</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiRatioSeq8playTrigEd11DOUBLEARRAY" title="Permalink to this definition"></a><br /></dt>
<dd><p><p>Divide a phasor into periods according to a set o ratios, and send a trigger at the start of each period.</p>
<p>Examples ratios: (assuming the phasor takes the length of one bar to cycle and 4/4 timing):</p>
<p>{1,1,1,1} four crotchets</p>
<p>{2,2,2,1,1} three crotchets then two quavers</p>
<p>{4,4,4,1,1,1,1} three crotchets then four semi-quavers</p>
<p>{3,3,2} two dotted crotchets then a crotchet</p>
<p>{1} a semibrieve</p>
<p>{3,3,3,1,1,1} three crotchets followed by a triplet</p>
<p>{33,991,13,153} hmmm - well it might sound interesting?</p>
<p>{</p>
<a class="reference internal" href="#classmaxiMap_1af089e2f99ff54e37dca21ecbbeede950"><span class="std std-ref">maxiMap::linlin</span></a>(osc.phasor(0.4),0,1,10,20),100} modulate the ratios</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>phase</strong> – a phasor signal, rising from 0 to 1 (you could use <a class="reference internal" href="#classmaxiOsc_1af6d7b7b4a167aa90d5bb54f2e2228da4"><span class="std std-ref">maxiOsc::phasor</span></a>)</p></li>
<li><p><strong>times</strong> – a list of time ratios. The phasor will be divided up into these ratios, and a trigger will be returned at the start of each period</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a trigger at the start of each period</p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N12maxiRatioSeq10playValuesEd15DOUBLEARRAY_REF15DOUBLEARRAY_REF">
<span id="_CPPv3N12maxiRatioSeq10playValuesEd15DOUBLEARRAY_REF15DOUBLEARRAY_REF"></span><span id="_CPPv2N12maxiRatioSeq10playValuesEd15DOUBLEARRAY_REF15DOUBLEARRAY_REF"></span><span id="maxiRatioSeq::playValues__double.DOUBLEARRAY_REF.DOUBLEARRAY_REF"></span><span class="target" id="classmaxiRatioSeq_1aec432d4351d64a53325aed2e8dc7ea46"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">playValues</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">phase</span></span>, <span class="n"><span class="pre">DOUBLEARRAY_REF</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">times</span></span>, <span class="n"><span class="pre">DOUBLEARRAY_REF</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">values</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N12maxiRatioSeq10playValuesEd15DOUBLEARRAY_REF15DOUBLEARRAY_REF" title="Permalink to this definition"></a><br /></dt>
<dd><p>Take values incrementally from a list, with timing controlled by ratios </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>phase</strong> – see playTrig </p></li>
<li><p><strong>times</strong> – see playTrig </p></li>
<li><p><strong>values</strong> – an array of numbers. Each time a period starts, a number is returned from this list. Values are taken incrementally and with looping. The contents and length of the list are modulateable. This function is useful for sequencing pitches or controller values. </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a value taken incrementally from the list of values, updated each time a new timing period begins (according to the list of ratios) </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv411maxiSelectX">
<span id="_CPPv311maxiSelectX"></span><span id="_CPPv211maxiSelectX"></span><span id="maxiSelectX"></span><span class="target" id="classmaxiSelectX"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiSelectX</span></span></span><a class="headerlink" href="#_CPPv411maxiSelectX" title="Permalink to this definition"></a><br /></dt>
<dd><p>Read from an array of signals or values, with linear interpolation between neighbours - like supercollider SelectX.ar </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N11maxiSelectX4playEd15DOUBLEARRAY_REFb">
<span id="_CPPv3N11maxiSelectX4playEd15DOUBLEARRAY_REFb"></span><span id="_CPPv2N11maxiSelectX4playEd15DOUBLEARRAY_REFb"></span><span id="maxiSelectX::play__double.DOUBLEARRAY_REF.b"></span><span class="target" id="classmaxiSelectX_1a46f83b27aaf5152840cdfea3dd90eb54"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">play</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">index</span></span>, <span class="n"><span class="pre">DOUBLEARRAY_REF</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">values</span></span>, <span class="kt"><span class="pre">bool</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">normalised</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N11maxiSelectX4playEd15DOUBLEARRAY_REFb" title="Permalink to this definition"></a><br /></dt>
<dd><p>Read from an array with linear interpolation. This can be useful for cross-fading across sets of signals. </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>index</strong> – an index into the array </p></li>
<li><p><strong>values</strong> – a modulateable array of values </p></li>
<li><p><strong>normalised</strong> – if true, the index should be between 0 and 1, if false, then the index should be between 0 and length(values)-1 </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><p>an item from the array of values, according to the index, and interpolating between neighbouring values.</p>
<p>e.g if values = {2,3} and normalised index = 0.5, then 2.5 will be returns</p>
</p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv49maxiIndex">
<span id="_CPPv39maxiIndex"></span><span id="_CPPv29maxiIndex"></span><span id="maxiIndex"></span><span class="target" id="classmaxiIndex"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiIndex</span></span></span><a class="headerlink" href="#_CPPv49maxiIndex" title="Permalink to this definition"></a><br /></dt>
<dd><p>Pull values from an array when a trigger is received, according to a modulateable index </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N9maxiIndex4pullEKdd15DOUBLEARRAY_REF">
<span id="_CPPv3N9maxiIndex4pullEKdd15DOUBLEARRAY_REF"></span><span id="_CPPv2N9maxiIndex4pullEKdd15DOUBLEARRAY_REF"></span><span id="maxiIndex::pull__doubleC.double.DOUBLEARRAY_REF"></span><span class="target" id="classmaxiIndex_1ac8f956dad0d87d2b93c8da9d72386658"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">pull</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">trigSig</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">indexSig</span></span>, <span class="n"><span class="pre">DOUBLEARRAY_REF</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">_values</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N9maxiIndex4pullEKdd15DOUBLEARRAY_REF" title="Permalink to this definition"></a><br /></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>trigSig</strong> – a signal </p></li>
<li><p><strong>indexSig</strong> – a normalised index into the array (0-1) </p></li>
<li><p><strong>_values</strong> – an array of values or signals (modulateable) </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the value at [indexSig] in the array, when a trigger is received in [trigSig] </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

</section>
<section id="multichannel">
<h2>Multichannel<a class="headerlink" href="#multichannel" title="Permalink to this heading"></a></h2>
<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv47maxiMix">
<span id="_CPPv37maxiMix"></span><span id="_CPPv27maxiMix"></span><span id="maxiMix"></span><span class="target" id="classmaxiMix"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiMix</span></span></span><a class="headerlink" href="#_CPPv47maxiMix" title="Permalink to this definition"></a><br /></dt>
<dd><p>Functions for multichannel panning </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiMix6stereoEdRNSt6vectorIdEEd">
<span id="_CPPv3N7maxiMix6stereoEdRNSt6vectorIdEEd"></span><span id="_CPPv2N7maxiMix6stereoEdRNSt6vectorIdEEd"></span><span id="maxiMix::stereo__double.std::vector:double:R.double"></span><span class="target" id="classmaxiMix_1a11318d7bbbc883ada570a07a0d0a1bab"></span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">stereo</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">input</span></span>, <span class="n"><span class="pre">std</span></span><span class="p"><span class="pre">::</span></span><span class="n"><span class="pre">vector</span></span><span class="p"><span class="pre">&lt;</span></span><span class="kt"><span class="pre">double</span></span><span class="p"><span class="pre">&gt;</span></span><span class="w"> </span><span class="p"><span class="pre">&amp;</span></span><span class="n sig-param"><span class="pre">two</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">x</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiMix6stereoEdRNSt6vectorIdEEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Stereo panning </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>input</strong> – A mono signal </p></li>
<li><p><strong>two</strong> – A vector (size 2) into which the signal is panned in-place </p></li>
<li><p><strong>x</strong> – The panning level (0 to 1) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiMix4quadEdRNSt6vectorIdEEdd">
<span id="_CPPv3N7maxiMix4quadEdRNSt6vectorIdEEdd"></span><span id="_CPPv2N7maxiMix4quadEdRNSt6vectorIdEEdd"></span><span id="maxiMix::quad__double.std::vector:double:R.double.double"></span><span class="target" id="classmaxiMix_1ad57bfa7266b5638f0acdff028385650a"></span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">quad</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">input</span></span>, <span class="n"><span class="pre">std</span></span><span class="p"><span class="pre">::</span></span><span class="n"><span class="pre">vector</span></span><span class="p"><span class="pre">&lt;</span></span><span class="kt"><span class="pre">double</span></span><span class="p"><span class="pre">&gt;</span></span><span class="w"> </span><span class="p"><span class="pre">&amp;</span></span><span class="n sig-param"><span class="pre">four</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">x</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">y</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiMix4quadEdRNSt6vectorIdEEdd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Quadraphonic panning </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>input</strong> – A mono signal </p></li>
<li><p><strong>four</strong> – A vector (size 4) into which the signal is panned </p></li>
<li><p><strong>x</strong> – Left-right panning level (0 to 1) </p></li>
<li><p><strong>y</strong> – Forward-backward panning level (0 to 1) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiMix9ambisonicEdRNSt6vectorIdEEddd">
<span id="_CPPv3N7maxiMix9ambisonicEdRNSt6vectorIdEEddd"></span><span id="_CPPv2N7maxiMix9ambisonicEdRNSt6vectorIdEEddd"></span><span id="maxiMix::ambisonic__double.std::vector:double:R.double.double.double"></span><span class="target" id="classmaxiMix_1a328e0773ca68b2f41b06d63641a93aab"></span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">ambisonic</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">input</span></span>, <span class="n"><span class="pre">std</span></span><span class="p"><span class="pre">::</span></span><span class="n"><span class="pre">vector</span></span><span class="p"><span class="pre">&lt;</span></span><span class="kt"><span class="pre">double</span></span><span class="p"><span class="pre">&gt;</span></span><span class="w"> </span><span class="p"><span class="pre">&amp;</span></span><span class="n sig-param"><span class="pre">eight</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">x</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">y</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">z</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiMix9ambisonicEdRNSt6vectorIdEEddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Ambisonic panning </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>input</strong> – A mono signal </p></li>
<li><p><strong>eight</strong> – A vector (size 8) into which the signal is panned </p></li>
<li><p><strong>x</strong> – Left-right panning level (0 to 1) </p></li>
<li><p><strong>y</strong> – Forward-backward panning level (0 to 1) </p></li>
<li><p><strong>z</strong> – Up-down panning level (0 to 1) </p></li>
</ul>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv49maxiXFade">
<span id="_CPPv39maxiXFade"></span><span id="_CPPv29maxiXFade"></span><span id="maxiXFade"></span><span class="target" id="classmaxiXFade"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiXFade</span></span></span><a class="headerlink" href="#_CPPv49maxiXFade" title="Permalink to this definition"></a><br /></dt>
<dd><p>Cross-fade between two signals, using equal-power panning </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-static-functions">Public Static Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N9maxiXFade5xfadeER6vectorIdER6vectorIdEd">
<span id="_CPPv3N9maxiXFade5xfadeER6vectorIdER6vectorIdEd"></span><span id="_CPPv2N9maxiXFade5xfadeER6vectorIdER6vectorIdEd"></span><span id="maxiXFade::xfade__vector:double:R.vector:double:R.double"></span><span class="target" id="classmaxiXFade_1ac7c6c4025e0d5205dcb5fd68e58fe465"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="n"><span class="pre">vector</span></span><span class="p"><span class="pre">&lt;</span></span><span class="kt"><span class="pre">double</span></span><span class="p"><span class="pre">&gt;</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">xfade</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">vector</span></span><span class="p"><span class="pre">&lt;</span></span><span class="kt"><span class="pre">double</span></span><span class="p"><span class="pre">&gt;</span></span><span class="w"> </span><span class="p"><span class="pre">&amp;</span></span><span class="n sig-param"><span class="pre">ch1</span></span>, <span class="n"><span class="pre">vector</span></span><span class="p"><span class="pre">&lt;</span></span><span class="kt"><span class="pre">double</span></span><span class="p"><span class="pre">&gt;</span></span><span class="w"> </span><span class="p"><span class="pre">&amp;</span></span><span class="n sig-param"><span class="pre">ch2</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">xfader</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N9maxiXFade5xfadeER6vectorIdER6vectorIdEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Cross-fade between stereo signals </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>ch1</strong> – a vector containing left and right components of channel 1 </p></li>
<li><p><strong>ch2</strong> – a vector containing left and right components of channel 2 </p></li>
<li><p><strong>xfader</strong> – the cross-fader position, -1=100% ch1, 1=100% ch2, 0=an equal mix of both channels </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N9maxiXFade5xfadeEddd">
<span id="_CPPv3N9maxiXFade5xfadeEddd"></span><span id="_CPPv2N9maxiXFade5xfadeEddd"></span><span id="maxiXFade::xfade__double.double.double"></span><span class="target" id="classmaxiXFade_1a67205bfeb70b1bd1419b72a2ee451ab5"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">xfade</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">ch1</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">ch2</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">xfader</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N9maxiXFade5xfadeEddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Cross-fade between mono signals </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>ch1</strong> – the signal for channel 1 </p></li>
<li><p><strong>ch2</strong> – the signal for channel 2 </p></li>
<li><p><strong>xfader</strong> – the cross-fader position, -1=100% ch1, 1=100% ch2, 0=an equal mix of both channels </p></li>
</ul>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

</section>
<section id="utility-functions">
<h2>Utility Functions<a class="headerlink" href="#utility-functions" title="Permalink to this heading"></a></h2>
<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv47maxiMap">
<span id="_CPPv37maxiMap"></span><span id="_CPPv27maxiMap"></span><span id="maxiMap"></span><span class="target" id="classmaxiMap"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiMap</span></span></span><a class="headerlink" href="#_CPPv47maxiMap" title="Permalink to this definition"></a><br /></dt>
<dd><p>Various mapping functions </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-static-functions">Public Static Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiMap6linlinEddddd">
<span id="_CPPv3N7maxiMap6linlinEddddd"></span><span id="_CPPv2N7maxiMap6linlinEddddd"></span><span id="maxiMap::linlin__double.double.double.double.double"></span><span class="target" id="classmaxiMap_1af089e2f99ff54e37dca21ecbbeede950"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">linlin</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">val</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">inMin</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">inMax</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">outMin</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">outMax</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiMap6linlinEddddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Map from one range to another, linearly </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>val</strong> – a signal </p></li>
<li><p><strong>inMin</strong> – the lowest expected value of the signal </p></li>
<li><p><strong>inMax</strong> – the highest expected value of the signal </p></li>
<li><p><strong>outMin</strong> – the lowest value in the new range of the signal </p></li>
<li><p><strong>outMax</strong> – the highest value in the new range of the signal </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a signal </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiMap6linexpEddddd">
<span id="_CPPv3N7maxiMap6linexpEddddd"></span><span id="_CPPv2N7maxiMap6linexpEddddd"></span><span id="maxiMap::linexp__double.double.double.double.double"></span><span class="target" id="classmaxiMap_1acdcf4bc4384d39b3ed2e259002434f92"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">linexp</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">val</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">inMin</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">inMax</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">outMin</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">outMax</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiMap6linexpEddddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Map from one range to another, converting from linear to expontial - useful from mapping control values to frequencies etc </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>val</strong> – a signal </p></li>
<li><p><strong>inMin</strong> – the lowest expected value of the signal </p></li>
<li><p><strong>inMax</strong> – the highest expected value of the signal </p></li>
<li><p><strong>outMin</strong> – the lowest value in the new range of the signal </p></li>
<li><p><strong>outMax</strong> – the highest value in the new range of the signal </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a signal </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiMap6explinEddddd">
<span id="_CPPv3N7maxiMap6explinEddddd"></span><span id="_CPPv2N7maxiMap6explinEddddd"></span><span id="maxiMap::explin__double.double.double.double.double"></span><span class="target" id="classmaxiMap_1a4cb165b90b1c9c99aa607df31bf59929"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">explin</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">val</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">inMin</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">inMax</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">outMin</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">outMax</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiMap6explinEddddd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Map from one range to another, converting from an exponential value to a linear one </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>val</strong> – a signal </p></li>
<li><p><strong>inMin</strong> – the lowest expected value of the signal </p></li>
<li><p><strong>inMax</strong> – the highest expected value of the signal </p></li>
<li><p><strong>outMin</strong> – the lowest value in the new range of the signal </p></li>
<li><p><strong>outMax</strong> – the highest value in the new range of the signal </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a signal </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7maxiMap5clampEdKdKd">
<span id="_CPPv3N7maxiMap5clampEdKdKd"></span><span id="_CPPv2N7maxiMap5clampEdKdKd"></span><span id="maxiMap::clamp__double.doubleC.doubleC"></span><span class="target" id="classmaxiMap_1a04c77c190b34b097762fdc5fa32f385b"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">clamp</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">v</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">low</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">high</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N7maxiMap5clampEdKdKd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Restrict a signal to upper and lower bounds </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>v</strong> – a signal </p></li>
<li><p><strong>low</strong> – the lowest value </p></li>
<li><p><strong>high</strong> – the highest value </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a signal </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv48maxiPoll">
<span id="_CPPv38maxiPoll"></span><span id="_CPPv28maxiPoll"></span><span id="maxiPoll"></span><span class="target" id="classmaxiPoll"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiPoll</span></span></span><a class="headerlink" href="#_CPPv48maxiPoll" title="Permalink to this definition"></a><br /></dt>
<dd><p>Poll values to stdout at regular intervals </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N8maxiPoll4pollEdd6string6string">
<span id="_CPPv3N8maxiPoll4pollEdd6string6string"></span><span id="_CPPv2N8maxiPoll4pollEdd6string6string"></span><span id="maxiPoll::poll__double.double.string.string"></span><span class="target" id="classmaxiPoll_1a7e72b3804fef19771d40c2bb90b37ba8"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">poll</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">val</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">frequency</span></span><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="m"><span class="pre">4</span></span>, <span class="n"><span class="pre">string</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">txt</span></span><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="s"><span class="pre">&quot;&quot;</span></span>, <span class="n"><span class="pre">string</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">end</span></span><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="s"><span class="pre">&quot;\n&quot;</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N8maxiPoll4pollEdd6string6string" title="Permalink to this definition"></a><br /></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>val</strong> – The value to poll </p></li>
<li><p><strong>frequency</strong> – How often to print this value (Hz) </p></li>
<li><p><strong>txt</strong> – Additional text to br printed before the value </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the value being polled, so this can used as a pass-through function e.g. filter.play(obj.poll(osc.saw(2)),0.5) </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv411maxiConvert">
<span id="_CPPv311maxiConvert"></span><span id="_CPPv211maxiConvert"></span><span id="maxiConvert"></span><span class="target" id="classmaxiConvert"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiConvert</span></span></span><a class="headerlink" href="#_CPPv411maxiConvert" title="Permalink to this definition"></a><br /></dt>
<dd><p>Conversion functions </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-static-functions">Public Static Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N11maxiConvert4mtofEi">
<span id="_CPPv3N11maxiConvert4mtofEi"></span><span id="_CPPv2N11maxiConvert4mtofEi"></span><span id="maxiConvert::mtof__i"></span><span class="target" id="classmaxiConvert_1a297c99035cb6a4727654133d792c22e1"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">mtof</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">midinote</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N11maxiConvert4mtofEi" title="Permalink to this definition"></a><br /></dt>
<dd><p>Convert from MIDI note number to frequency (Hz)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>midinote</strong> – A MIDI note number </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N11maxiConvert9msToSampsEd">
<span id="_CPPv3N11maxiConvert9msToSampsEd"></span><span id="_CPPv2N11maxiConvert9msToSampsEd"></span><span id="maxiConvert::msToSamps__double"></span><span class="target" id="classmaxiConvert_1acafb7f84fc30c76960a2b0025ad754b8"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">msToSamps</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">timeMs</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N11maxiConvert9msToSampsEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Convert from milliseconds to samples</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>timeMs</strong> – The number of milliseconds </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N11maxiConvert9sampsToMsE6size_t">
<span id="_CPPv3N11maxiConvert9sampsToMsE6size_t"></span><span id="_CPPv2N11maxiConvert9sampsToMsE6size_t"></span><span id="maxiConvert::sampsToMs__s"></span><span class="target" id="classmaxiConvert_1a3a38c2c0d8943dfba338e6eda687b0d3"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">sampsToMs</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">samples</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N11maxiConvert9sampsToMsE6size_t" title="Permalink to this definition"></a><br /></dt>
<dd><p>Convert from samples to milliseconds</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>samples</strong> – The number of samples </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N11maxiConvert8ampToDbsEd">
<span id="_CPPv3N11maxiConvert8ampToDbsEd"></span><span id="_CPPv2N11maxiConvert8ampToDbsEd"></span><span id="maxiConvert::ampToDbs__double"></span><span class="target" id="classmaxiConvert_1a8048c8af50733d0ff5cadeae82955397"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">ampToDbs</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">amp</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N11maxiConvert8ampToDbsEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Convert from amplitude to decibels</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>amp</strong> – Amplitude </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N11maxiConvert8dbsToAmpEd">
<span id="_CPPv3N11maxiConvert8dbsToAmpEd"></span><span id="_CPPv2N11maxiConvert8dbsToAmpEd"></span><span id="maxiConvert::dbsToAmp__double"></span><span class="target" id="classmaxiConvert_1ab3caacc73f0a612e458181bd721dcc1f"></span><span class="k"><span class="pre">static</span></span><span class="w"> </span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">dbsToAmp</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">dbs</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N11maxiConvert8dbsToAmpEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Convert from decibels to amplitude</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>dbs</strong> – Decibels </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv411maxiRingBuf">
<span id="_CPPv311maxiRingBuf"></span><span id="_CPPv211maxiRingBuf"></span><span id="maxiRingBuf"></span><span class="target" id="classmaxiRingBuf"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">maxiRingBuf</span></span></span><a class="headerlink" href="#_CPPv411maxiRingBuf" title="Permalink to this definition"></a><br /></dt>
<dd><p>A ring buffer. This enables you to look at the last N values in a time series. </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N11maxiRingBuf5setupE6size_t">
<span id="_CPPv3N11maxiRingBuf5setupE6size_t"></span><span id="_CPPv2N11maxiRingBuf5setupE6size_t"></span><span id="maxiRingBuf::setup__s"></span><span class="target" id="classmaxiRingBuf_1af577d377112b3e7cf10aeb38cbbf977b"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">setup</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">N</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N11maxiRingBuf5setupE6size_t" title="Permalink to this definition"></a><br /></dt>
<dd><p>Allocate memory for the buffer</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>N</strong> – The maximum length of the buffer </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N11maxiRingBuf4pushEd">
<span id="_CPPv3N11maxiRingBuf4pushEd"></span><span id="_CPPv2N11maxiRingBuf4pushEd"></span><span id="maxiRingBuf::push__double"></span><span class="target" id="classmaxiRingBuf_1acbb50ba3f6d06388276ac407500af474"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">push</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">x</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N11maxiRingBuf4pushEd" title="Permalink to this definition"></a><br /></dt>
<dd><p>Add the latest value to the buffer</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>x</strong> – A value </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N11maxiRingBuf4sizeEv">
<span id="_CPPv3N11maxiRingBuf4sizeEv"></span><span id="_CPPv2N11maxiRingBuf4sizeEv"></span><span id="maxiRingBuf::size"></span><span class="target" id="classmaxiRingBuf_1ab73fc50129d00cc859110984095e7ea9"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">size</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N11maxiRingBuf4sizeEv" title="Permalink to this definition"></a><br /></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>The size of the buffer </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N11maxiRingBuf4headEv">
<span id="_CPPv3N11maxiRingBuf4headEv"></span><span id="_CPPv2N11maxiRingBuf4headEv"></span><span id="maxiRingBuf::head"></span><span class="target" id="classmaxiRingBuf_1a37a316f7a7d30b80674f53dd2cdd83ed"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">head</span></span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N11maxiRingBuf4headEv" title="Permalink to this definition"></a><br /></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>the value at the front of the buffer </p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N11maxiRingBuf4tailE6size_t">
<span id="_CPPv3N11maxiRingBuf4tailE6size_t"></span><span id="_CPPv2N11maxiRingBuf4tailE6size_t"></span><span id="maxiRingBuf::tail__s"></span><span class="target" id="classmaxiRingBuf_1a6b3245facdc13657159d487f93aa4851"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">tail</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">N</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N11maxiRingBuf4tailE6size_t" title="Permalink to this definition"></a><br /></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>N</strong> – The size of the window, N &lt; the size of the buffer </p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the oldest value in the buffer, for a particular window size</p>
</dd>
</dl>
</dd></dl>

<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N11maxiRingBuf6reduceE6size_t14reduceFunctiond">
<span id="_CPPv3N11maxiRingBuf6reduceE6size_t14reduceFunctiond"></span><span id="_CPPv2N11maxiRingBuf6reduceE6size_t14reduceFunctiond"></span><span id="maxiRingBuf::reduce__s.reduceFunction.double"></span><span class="target" id="classmaxiRingBuf_1ab05fffc8720e0d8c7dc748299f2a5735"></span><span class="k"><span class="pre">inline</span></span><span class="w"> </span><span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">reduce</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">N</span></span>, <span class="n"><span class="pre">reduceFunction</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">func</span></span>, <span class="kt"><span class="pre">double</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">initval</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N11maxiRingBuf6reduceE6size_t14reduceFunctiond" title="Permalink to this definition"></a><br /></dt>
<dd><p>Apply a function of the previous N values in the buffer </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>N</strong> – The number of values in the window </p></li>
<li><p><strong>func</strong> – A function in the form double func(double previousResult, double nextValue) </p></li>
<li><p><strong>initval</strong> – The initial value to pass into the function (usually 0) </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The last result of the function, after passing in all values from the window Example: this function will sum the values in the window: auto sumfunc = [](double val, double n) {return val + n;}; </p>
</dd>
</dl>
</dd></dl>

</div>
</dd></dl>

</section>
</section>


           </div>
          </div>
          <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
        <a href="install.html" class="btn btn-neutral float-left" title="Installation" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
        <a href="extended.html" class="btn btn-neutral float-right" title="Extended" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>&#169; Copyright 2008 onwards.</p>
  </div>

  Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
    <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
    provided by <a href="https://readthedocs.org">Read the Docs</a>.
   

</footer>
        </div>
      </div>
    </section>
  </div>
  <script>
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script> 

</body>
</html>